Enhance ServicesScreen with Currency Converter Modal and localization updates
- Added a CurrencyConverterModal to the ServicesScreen, triggered by a new TouchableOpacity around the service card for currency calculation. - Updated localization file to include a new key for the currency converter.
This commit is contained in:
@@ -1,20 +1,31 @@
|
||||
import { StyleSheet, SafeAreaView, FlatList, View } from 'react-native';
|
||||
import { StyleSheet, SafeAreaView, View, TouchableOpacity } from 'react-native';
|
||||
import { Text } from '@/components/Themed';
|
||||
import i18n from '@/i18n';
|
||||
import { FontAwesome5 } from '@expo/vector-icons';
|
||||
import ServiceCard from '@/components/ServiceCard';
|
||||
import React, { useState } from 'react';
|
||||
import CurrencyConverterModal from '@/components/CurrencyConverterModal';
|
||||
|
||||
export default function ServicesScreen() {
|
||||
const [modalVisible, setModalVisible] = useState(false);
|
||||
|
||||
return (
|
||||
<SafeAreaView style={styles.container}>
|
||||
<Text style={styles.title}>{i18n.t('services')}</Text>
|
||||
|
||||
<View style={styles.row}>
|
||||
<ServiceCard title="Manat kursy" icon={<FontAwesome5 name="dollar-sign" size={24} color="#D4AF37" />} />
|
||||
<TouchableOpacity onPress={() => setModalVisible(true)}>
|
||||
<ServiceCard title="Real Manat hasaplama" icon={<FontAwesome5 name="dollar-sign" size={24} color="#D4AF37" />} />
|
||||
</TouchableOpacity>
|
||||
|
||||
<ServiceCard title="Oteliň wizitkasy" icon={<FontAwesome5 name="hotel" size={24} color="#D4AF37" />} />
|
||||
<ServiceCard title="Oteliň açary içinde galsa" icon={<FontAwesome5 name="key" size={24} color="#D4AF37" />} />
|
||||
<ServiceCard title="Terjimeçi" icon={<FontAwesome5 name="language" size={24} color="#D4AF37" />} />
|
||||
</View>
|
||||
<CurrencyConverterModal
|
||||
visible={modalVisible}
|
||||
onClose={() => setModalVisible(false)}
|
||||
/>
|
||||
</SafeAreaView>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user