|
|
@@ -17,13 +17,15 @@ import {
|
|
|
WalletSvg,
|
|
|
NotificationSvg,
|
|
|
BookingIconSvg,
|
|
|
- UserTermsSvg
|
|
|
+ UserTermsSvg,
|
|
|
+ LanguageSvg
|
|
|
} from '../global/SVG';
|
|
|
import { usePushNotifications } from '../../app/hooks/usePushNotifications';
|
|
|
import useUserInfoStore from '../../providers/userinfo_store';
|
|
|
import { authenticationService } from '../../service/authService';
|
|
|
import { handleGoWhatsApp } from '../../util/index';
|
|
|
import { useTranslation } from '../../util/hooks/useTranslation';
|
|
|
+import LanguageSwitcher from '../registrationMultiStepForm/formComponent/formPages/languageSwitcher';
|
|
|
|
|
|
const AccountMainPageComponent = () => {
|
|
|
const { user, logout } = useAuth();
|
|
|
@@ -73,7 +75,6 @@ const AccountMainPageComponent = () => {
|
|
|
};
|
|
|
}, [expoPushToken]) // Add expoPushToken as a dependency
|
|
|
);
|
|
|
-
|
|
|
const toggleNotifications = async () => {
|
|
|
Alert.alert(t('account.notification_settings'), t('account.notification_settings_message'), [
|
|
|
{
|
|
|
@@ -86,7 +87,6 @@ const AccountMainPageComponent = () => {
|
|
|
}
|
|
|
]);
|
|
|
};
|
|
|
-
|
|
|
return (
|
|
|
<SafeAreaView className="flex-1 bg-white dark:bg-[#05181C]" edges={['top', 'left', 'right']}>
|
|
|
<ScrollView className="flex-1 mx-[5%]" showsVerticalScrollIndicator={false}>
|
|
|
@@ -104,14 +104,6 @@ const AccountMainPageComponent = () => {
|
|
|
<WalletSvg isDark={colorScheme == 'dark'} />
|
|
|
<Text className="text-black dark:text-[#36DFFF]">{t('account.wallet')}</Text>
|
|
|
</Pressable>
|
|
|
-
|
|
|
- {/* <Pressable
|
|
|
- className="h-[114px] w-[30%] bg-[#e7f2f8] items-center justify-center rounded-xl"
|
|
|
- onPress={() => router.replace('myVehiclePage')}
|
|
|
- >
|
|
|
- <MyCarSvg />
|
|
|
- <Text>{t('account.my_vehicle')}</Text>
|
|
|
- </Pressable> */}
|
|
|
<Pressable
|
|
|
className="h-[114px] w-[30%] bg-[#e7f2f8] dark:bg-[#253336] items-center justify-center rounded-xl"
|
|
|
onPress={() => router.replace('vipQrPage')}
|
|
|
@@ -174,7 +166,6 @@ const AccountMainPageComponent = () => {
|
|
|
<View className="h-0.5 bg-[#f4f4f4] dark:bg-[#5E6C70]" />
|
|
|
<View className=" py-4 ">
|
|
|
<Pressable
|
|
|
- // onPress={() => router.push('/assistancePage')}
|
|
|
className="flex-row items-center"
|
|
|
hitSlop={{
|
|
|
top: 10,
|
|
|
@@ -188,14 +179,13 @@ const AccountMainPageComponent = () => {
|
|
|
<NotificationSvg isDark={colorScheme == 'dark'} />
|
|
|
<Text className="text-lg pl-2 text-black dark:text-white">{t('account.allow_notifications')}</Text>
|
|
|
</View>
|
|
|
- <Switch value={notificationsEnabled} onChange={toggleNotifications} />
|
|
|
+ <Switch className='mr-8' value={notificationsEnabled} onChange={toggleNotifications} />
|
|
|
</View>
|
|
|
</Pressable>
|
|
|
</View>
|
|
|
- {/* <View className="h-0.5 bg-[#f4f4f4] dark:bg-[#5E6C70]" />
|
|
|
- <View className=" py-4 ">
|
|
|
+ <View className="h-0.5 bg-[#f4f4f4] dark:bg-[#5E6C70]" />
|
|
|
+ <View className="py-4">
|
|
|
<Pressable
|
|
|
- // onPress={() => router.push('/assistancePage')}
|
|
|
className="flex-row items-center"
|
|
|
hitSlop={{
|
|
|
top: 10,
|
|
|
@@ -206,13 +196,13 @@ const AccountMainPageComponent = () => {
|
|
|
>
|
|
|
<View className="flex flex-row justify-between w-full">
|
|
|
<View className="flex flex-row items-center">
|
|
|
- <DarkModeSvg isDark={colorScheme == 'dark'} />
|
|
|
- <Text className="text-lg pl-2 text-black dark:text-white">{t('account.dark_mode')}</Text>
|
|
|
+ <LanguageSvg isDark={colorScheme == 'dark'} />
|
|
|
+ <Text className="text-lg pl-2 text-black dark:text-white">{t('account.select_language')}</Text>
|
|
|
</View>
|
|
|
- <Switch value={colorScheme == 'dark'} onChange={toggleColorScheme} />
|
|
|
+ <LanguageSwitcher/>
|
|
|
</View>
|
|
|
</Pressable>
|
|
|
- </View> */}
|
|
|
+ </View>
|
|
|
<View className="h-0.5 bg-[#f4f4f4] dark:bg-[#5E6C70]" />
|
|
|
<View className="py-4">
|
|
|
<Pressable
|