complated
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
import ConfirmScreen from '@/screens/auth/confirm/ConfirmScreen';
|
||||
import { ScrollView } from 'react-native';
|
||||
import { SafeAreaView } from 'react-native-safe-area-context';
|
||||
import { ScrollView, View } from 'react-native';
|
||||
|
||||
export default function Confirm() {
|
||||
return (
|
||||
<SafeAreaView
|
||||
<View
|
||||
style={{
|
||||
flex: 1,
|
||||
backgroundColor: '#0f172a',
|
||||
@@ -13,6 +12,6 @@ export default function Confirm() {
|
||||
<ScrollView contentContainerStyle={{ flexGrow: 1 }} keyboardShouldPersistTaps="handled">
|
||||
<ConfirmScreen />
|
||||
</ScrollView>
|
||||
</SafeAreaView>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@ import LoginScreen from '@/screens/auth/login/ui/LoginScreens';
|
||||
import { router } from 'expo-router';
|
||||
import { useEffect } from 'react';
|
||||
import { ActivityIndicator, ScrollView, View } from 'react-native';
|
||||
import { SafeAreaView } from 'react-native-safe-area-context';
|
||||
|
||||
export default function Index() {
|
||||
const { isAuthenticated, isLoading } = useAuth();
|
||||
@@ -27,11 +26,11 @@ export default function Index() {
|
||||
// Token yo‘q → login screen
|
||||
if (!isAuthenticated) {
|
||||
return (
|
||||
<SafeAreaView style={{ flex: 1, backgroundColor: '#0f172a' }}>
|
||||
<View style={{ flex: 1, backgroundColor: '#0f172a' }}>
|
||||
<ScrollView contentContainerStyle={{ flexGrow: 1 }}>
|
||||
<LoginScreen />
|
||||
</ScrollView>
|
||||
</SafeAreaView>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
import RegisterConfirmScreen from '@/screens/auth/register-confirm/ConfirmScreen';
|
||||
import { ScrollView } from 'react-native';
|
||||
import { SafeAreaView } from 'react-native-safe-area-context';
|
||||
import { ScrollView, View } from 'react-native';
|
||||
|
||||
export default function RegisterConfirm() {
|
||||
return (
|
||||
<SafeAreaView
|
||||
<View
|
||||
style={{
|
||||
flex: 1,
|
||||
backgroundColor: '#0f172a',
|
||||
@@ -13,6 +12,6 @@ export default function RegisterConfirm() {
|
||||
<ScrollView contentContainerStyle={{ flexGrow: 1 }} keyboardShouldPersistTaps="handled">
|
||||
<RegisterConfirmScreen />
|
||||
</ScrollView>
|
||||
</SafeAreaView>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
import RegisterScreen from '@/screens/auth/register/RegisterScreen';
|
||||
import React from 'react';
|
||||
import { ScrollView, StyleSheet } from 'react-native';
|
||||
import { SafeAreaView } from 'react-native-safe-area-context';
|
||||
import { ScrollView, StyleSheet, View } from 'react-native';
|
||||
|
||||
export default function Index() {
|
||||
return (
|
||||
<SafeAreaView style={styles.safeArea}>
|
||||
<View style={styles.safeArea}>
|
||||
<ScrollView
|
||||
contentContainerStyle={{ flexGrow: 1 }}
|
||||
keyboardShouldPersistTaps="handled"
|
||||
@@ -13,7 +12,7 @@ export default function Index() {
|
||||
>
|
||||
<RegisterScreen />
|
||||
</ScrollView>
|
||||
</SafeAreaView>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -16,8 +16,8 @@ import {
|
||||
StyleSheet,
|
||||
Text,
|
||||
TouchableOpacity,
|
||||
View,
|
||||
} from 'react-native';
|
||||
import { SafeAreaView } from 'react-native-safe-area-context';
|
||||
|
||||
interface Category {
|
||||
id: number;
|
||||
@@ -95,7 +95,7 @@ export default function CategorySelectScreen() {
|
||||
};
|
||||
|
||||
return (
|
||||
<SafeAreaView style={styles.safeArea}>
|
||||
<View style={styles.safeArea}>
|
||||
<AuthHeader />
|
||||
<Stack.Screen options={{ title: t('Yo‘nalishni tanlang') }} />
|
||||
|
||||
@@ -145,7 +145,7 @@ export default function CategorySelectScreen() {
|
||||
{t('Tadiqlash')}
|
||||
</Text>
|
||||
</TouchableOpacity>
|
||||
</SafeAreaView>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import Logo from '@/assets/images/logo.png';
|
||||
import { useTheme } from '@/components/ThemeContext';
|
||||
import { RefreshProvider } from '@/components/ui/RefreshContext';
|
||||
import { useHomeStore } from '@/screens/home/lib/hook';
|
||||
import { BottomSheetModalProvider } from '@gorhom/bottom-sheet';
|
||||
import { router, Tabs } from 'expo-router';
|
||||
import { Home, Megaphone, PlusCircle, User } from 'lucide-react-native';
|
||||
@@ -12,6 +13,7 @@ import { GestureHandlerRootView } from 'react-native-gesture-handler';
|
||||
export default function TabsLayout() {
|
||||
const { isDark } = useTheme();
|
||||
const { t } = useTranslation();
|
||||
const { setShowFilter, setStep } = useHomeStore();
|
||||
const rotateAnim = useRef(new Animated.Value(0)).current;
|
||||
|
||||
useEffect(() => {
|
||||
@@ -58,9 +60,9 @@ export default function TabsLayout() {
|
||||
paddingBottom: 12,
|
||||
borderTopLeftRadius: 24,
|
||||
borderTopRightRadius: 24,
|
||||
backgroundColor: isDark ? 'rgba(15, 23, 42, 0.95)' : 'rgba(255, 255, 255, 0.95)', // #0f172a mos fon
|
||||
backgroundColor: isDark ? 'rgba(15, 23, 42, 1)' : 'rgba(255, 255, 255, 1)', // #0f172a mos fon
|
||||
borderWidth: 0.5,
|
||||
borderColor: isDark ? 'rgba(255, 255, 255, 0.1)' : 'rgba(226, 232, 240, 0.8)', // quyuq fon uchun yengil oq
|
||||
borderColor: isDark ? 'rgba(255, 255, 255, 0.1)' : 'rgba(226, 232, 240, 1)', // quyuq fon uchun yengil oq
|
||||
...Platform.select({
|
||||
ios: {
|
||||
shadowColor: isDark ? '#0f172a' : '#0f172a', // shadow qora emas #0f172a bilan uyg‘un
|
||||
@@ -85,6 +87,7 @@ export default function TabsLayout() {
|
||||
>
|
||||
<Tabs.Screen
|
||||
name="index"
|
||||
key={"index"}
|
||||
options={{
|
||||
title: 'Bosh sahifa',
|
||||
tabBarLabel: ({ color, focused }) => (
|
||||
@@ -103,7 +106,12 @@ export default function TabsLayout() {
|
||||
</Text>
|
||||
),
|
||||
tabBarIcon: ({ color, focused }) => (
|
||||
<View
|
||||
<TouchableOpacity
|
||||
onPress={() => {
|
||||
router.push('/(dashboard)');
|
||||
setShowFilter(false);
|
||||
setStep('filter');
|
||||
}}
|
||||
style={[
|
||||
styles.iconContainer,
|
||||
focused && styles.iconContainerActive,
|
||||
@@ -113,7 +121,7 @@ export default function TabsLayout() {
|
||||
]}
|
||||
>
|
||||
<Home color={color} size={30} strokeWidth={2} />
|
||||
</View>
|
||||
</TouchableOpacity>
|
||||
),
|
||||
}}
|
||||
/>
|
||||
@@ -135,7 +143,7 @@ export default function TabsLayout() {
|
||||
},
|
||||
]}
|
||||
>
|
||||
{t("Qo'shish")}
|
||||
{t("Jo'natish")}
|
||||
</Text>
|
||||
),
|
||||
tabBarIcon: ({ color, focused }) => (
|
||||
|
||||
@@ -1,19 +1,12 @@
|
||||
import { useTheme } from '@/components/ThemeContext';
|
||||
import { FilterProvider } from '@/components/ui/FilterContext';
|
||||
import { CustomHeader } from '@/components/ui/Header';
|
||||
import DashboardScreen from '@/screens/announcements/ui/AnnouncementsList';
|
||||
import { SafeAreaView } from 'react-native-safe-area-context';
|
||||
|
||||
export default function Announcements() {
|
||||
const { isDark } = useTheme();
|
||||
return (
|
||||
<FilterProvider>
|
||||
<SafeAreaView
|
||||
style={{ flex: 1, backgroundColor: isDark ? '#0f172a' : '#ffffff', paddingBottom: 80 }}
|
||||
>
|
||||
<CustomHeader />
|
||||
<DashboardScreen />
|
||||
</SafeAreaView>
|
||||
<CustomHeader />
|
||||
<DashboardScreen />
|
||||
</FilterProvider>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -2,18 +2,13 @@ import { useTheme } from '@/components/ThemeContext';
|
||||
import { FilterProvider } from '@/components/ui/FilterContext';
|
||||
import { CustomHeader } from '@/components/ui/Header';
|
||||
import CreateAdsScreens from '@/screens/create-ads/ui/CreateAdsScreens';
|
||||
import { SafeAreaView } from 'react-native-safe-area-context';
|
||||
|
||||
export default function CreateAnnouncements() {
|
||||
const { isDark } = useTheme();
|
||||
return (
|
||||
<FilterProvider>
|
||||
<SafeAreaView
|
||||
style={{ flex: 1, backgroundColor: isDark ? '#0f172a' : '#ffffff', paddingBottom: 30 }}
|
||||
>
|
||||
<CustomHeader />
|
||||
<CreateAdsScreens />
|
||||
</SafeAreaView>
|
||||
<CustomHeader />
|
||||
<CreateAdsScreens />
|
||||
</FilterProvider>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,17 +1,11 @@
|
||||
import { useTheme } from '@/components/ThemeContext';
|
||||
import { CustomHeader } from '@/components/ui/Header';
|
||||
import EServicesScreen from '@/screens/e-services/ui/EServicesScreen';
|
||||
import { SafeAreaView } from 'react-native-safe-area-context';
|
||||
|
||||
export default function EServicesCategory() {
|
||||
const { isDark } = useTheme();
|
||||
return (
|
||||
<SafeAreaView
|
||||
style={{ flex: 1, backgroundColor: isDark ? '#0f172a' : '#ffffff', paddingBottom: 50 }}
|
||||
edges={['top']}
|
||||
>
|
||||
<>
|
||||
<CustomHeader />
|
||||
<EServicesScreen />
|
||||
</SafeAreaView>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,17 +1,13 @@
|
||||
import { useTheme } from '@/components/ThemeContext';
|
||||
import { CustomHeader } from '@/components/ui/Header';
|
||||
import EServicesCategoryScreen from '@/screens/e-services/ui/EServicesCategoryScreen';
|
||||
import { SafeAreaView } from 'react-native-safe-area-context';
|
||||
|
||||
export default function EServices() {
|
||||
const { isDark } = useTheme();
|
||||
return (
|
||||
<SafeAreaView
|
||||
style={{ flex: 1, backgroundColor: isDark ? '#0f172a' : '#ffffff', paddingBottom: 80 }}
|
||||
edges={['top']}
|
||||
>
|
||||
<>
|
||||
<CustomHeader />
|
||||
<EServicesCategoryScreen />
|
||||
</SafeAreaView>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,15 +1,12 @@
|
||||
// pages/home/index.tsx
|
||||
import { useAuth } from '@/components/AuthProvider';
|
||||
import { useTheme } from '@/components/ThemeContext';
|
||||
import { FilterProvider } from '@/components/ui/FilterContext';
|
||||
import { CustomHeader } from '@/components/ui/Header';
|
||||
import HomeScreen from '@/screens/home/ui/HomeScreen';
|
||||
import { router } from 'expo-router';
|
||||
import { useEffect } from 'react';
|
||||
import { SafeAreaView } from 'react-native-safe-area-context';
|
||||
|
||||
export default function Index() {
|
||||
const { isDark } = useTheme();
|
||||
const { isAuthenticated, isLoading } = useAuth();
|
||||
|
||||
useEffect(() => {
|
||||
@@ -19,17 +16,13 @@ export default function Index() {
|
||||
}, [isAuthenticated, isLoading]);
|
||||
|
||||
if (isLoading || !isAuthenticated) {
|
||||
return null; // Loading vaqtida yoki auth yo‘q bo‘lsa hech narsa ko‘rmasin
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<FilterProvider>
|
||||
<SafeAreaView
|
||||
style={{ flex: 1, backgroundColor: isDark ? '#0f172a' : '#ffffff', paddingBottom: 55 }}
|
||||
>
|
||||
<CustomHeader />
|
||||
<HomeScreen />
|
||||
</SafeAreaView>
|
||||
<CustomHeader />
|
||||
<HomeScreen />
|
||||
</FilterProvider>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,17 +1,11 @@
|
||||
import { useTheme } from '@/components/ThemeContext';
|
||||
import { CustomHeader } from '@/components/ui/Header';
|
||||
import Profile from '@/screens/profile/ui/ProfileScreen';
|
||||
import { SafeAreaView } from 'react-native-safe-area-context';
|
||||
|
||||
export default function ProfileScreen() {
|
||||
const { isDark } = useTheme();
|
||||
return (
|
||||
<SafeAreaView
|
||||
style={{ flex: 1, backgroundColor: isDark ? '#0f172a' : '#ffffff', paddingBottom: 40 }}
|
||||
edges={['top']}
|
||||
>
|
||||
<>
|
||||
<CustomHeader logoutbtn={true} notif={false} />
|
||||
<Profile />
|
||||
</SafeAreaView>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -5,19 +5,36 @@ import { useNotifications } from '@/hooks/useNotifications';
|
||||
import i18n from '@/i18n/i18n';
|
||||
import { ProfileDataProvider } from '@/screens/profile/lib/ProfileDataContext';
|
||||
import { Stack } from 'expo-router';
|
||||
import { StatusBar } from 'expo-status-bar';
|
||||
import { I18nextProvider } from 'react-i18next';
|
||||
import { View } from 'react-native';
|
||||
import 'react-native-reanimated';
|
||||
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
||||
|
||||
function AppContent() {
|
||||
useNotifications();
|
||||
const insets = useSafeAreaInsets();
|
||||
|
||||
return (
|
||||
<>
|
||||
{/* iOS status bar fon */}
|
||||
<View
|
||||
style={{
|
||||
height: insets.top,
|
||||
backgroundColor: '#000',
|
||||
}}
|
||||
/>
|
||||
|
||||
{/* StatusBar */}
|
||||
<StatusBar
|
||||
style="light"
|
||||
backgroundColor="#000" // Android
|
||||
/>
|
||||
|
||||
<Stack screenOptions={{ headerShown: false }} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export default function RootLayout() {
|
||||
return (
|
||||
<I18nextProvider i18n={i18n}>
|
||||
|
||||
@@ -18,7 +18,6 @@ import {
|
||||
TouchableOpacity,
|
||||
View,
|
||||
} from 'react-native';
|
||||
import { SafeAreaView } from 'react-native-safe-area-context';
|
||||
|
||||
export default function PersonalInfoScreen() {
|
||||
const router = useRouter();
|
||||
@@ -71,6 +70,8 @@ export default function PersonalInfoScreen() {
|
||||
phone: string;
|
||||
person_type: 'employee' | 'legal_entity' | 'ytt' | 'band';
|
||||
activate_types: number[];
|
||||
age: number | null;
|
||||
gender: 'male' | 'female' | null;
|
||||
}) => user_api.updateMe(body),
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({ queryKey: ['get_me'] });
|
||||
@@ -106,7 +107,7 @@ export default function PersonalInfoScreen() {
|
||||
|
||||
if (isLoading) {
|
||||
return (
|
||||
<SafeAreaView style={[styles.container, { backgroundColor: theme.background }]}>
|
||||
<View style={[styles.container, { backgroundColor: theme.background }]}>
|
||||
<View style={styles.topHeader}>
|
||||
<Pressable onPress={() => router.push('/profile/personal-info')}>
|
||||
<ArrowLeft color={theme.text} />
|
||||
@@ -117,12 +118,12 @@ export default function PersonalInfoScreen() {
|
||||
</Pressable>
|
||||
</View>
|
||||
<ActivityIndicator size={'large'} />
|
||||
</SafeAreaView>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<SafeAreaView style={[styles.container, { backgroundColor: theme.background }]}>
|
||||
<View style={[styles.container, { backgroundColor: theme.background }]}>
|
||||
<View style={styles.topHeader}>
|
||||
<Pressable onPress={() => router.push('/profile/personal-info')}>
|
||||
<ArrowLeft color={theme.text} />
|
||||
@@ -138,6 +139,8 @@ export default function PersonalInfoScreen() {
|
||||
phone: me.data.data.phone,
|
||||
industries: selectedCategories,
|
||||
activate_types,
|
||||
age: me.data.data.age,
|
||||
gender: me.data.data.gender,
|
||||
});
|
||||
}
|
||||
}}
|
||||
@@ -173,20 +176,21 @@ export default function PersonalInfoScreen() {
|
||||
setSelectedCategories={setSelectedCategories}
|
||||
/>
|
||||
</ScrollView>
|
||||
</SafeAreaView>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
container: {
|
||||
flex: 1,
|
||||
paddingBottom: 30,
|
||||
},
|
||||
tabsList: {
|
||||
maxHeight: 56,
|
||||
},
|
||||
tabsContainer: {
|
||||
alignItems: 'center',
|
||||
marginBottom: 20,
|
||||
marginBottom: 10,
|
||||
},
|
||||
tabWrapper: {
|
||||
flexDirection: 'row',
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { useTheme } from '@/components/ThemeContext';
|
||||
import { ManualTab } from '@/screens/profile/ui/ManualTab';
|
||||
import { SafeAreaView } from 'react-native-safe-area-context';
|
||||
import { View } from 'react-native';
|
||||
|
||||
export default function MyAds() {
|
||||
const { isDark } = useTheme();
|
||||
return (
|
||||
<SafeAreaView style={{ flex: 1, backgroundColor: isDark ? '#0f172a' : '#f8fafc' }}>
|
||||
<View style={{ flex: 1, backgroundColor: isDark ? '#0f172a' : '#f8fafc' }}>
|
||||
<ManualTab />
|
||||
</SafeAreaView>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { useTheme } from '@/components/ThemeContext';
|
||||
import { AnnouncementsTab } from '@/screens/profile/ui/AnnouncementsTab';
|
||||
import { SafeAreaView } from 'react-native-safe-area-context';
|
||||
import { View } from 'react-native';
|
||||
|
||||
export default function MyAds() {
|
||||
const { isDark } = useTheme();
|
||||
return (
|
||||
<SafeAreaView style={{ flex: 1, backgroundColor: isDark ? '#0f172a' : '#f8fafc' }}>
|
||||
<View style={{ flex: 1, backgroundColor: isDark ? '#0f172a' : '#f8fafc' }}>
|
||||
<AnnouncementsTab />
|
||||
</SafeAreaView>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { useTheme } from '@/components/ThemeContext';
|
||||
import { ReferralsTab } from '@/screens/profile/ui/RefferallsTab';
|
||||
import { SafeAreaView } from 'react-native-safe-area-context';
|
||||
import { View } from 'react-native';
|
||||
|
||||
export default function MyReffrals() {
|
||||
const { isDark } = useTheme();
|
||||
return (
|
||||
<SafeAreaView style={{ flex: 1, backgroundColor: isDark ? '#0f172a' : '#f8fafc' }}>
|
||||
<View style={{ flex: 1, backgroundColor: isDark ? '#0f172a' : '#f8fafc' }}>
|
||||
<ReferralsTab />
|
||||
</SafeAreaView>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { useTheme } from '@/components/ThemeContext';
|
||||
import { NotificationTab } from '@/screens/profile/ui/NotificationTab';
|
||||
import { SafeAreaView } from 'react-native-safe-area-context';
|
||||
import { View } from 'react-native';
|
||||
|
||||
export default function MyAds() {
|
||||
const { isDark } = useTheme();
|
||||
return (
|
||||
<SafeAreaView style={{ flex: 1, backgroundColor: isDark ? '#0f172a' : '#f8fafc' }}>
|
||||
<View style={{ flex: 1, backgroundColor: isDark ? '#0f172a' : '#f8fafc' }}>
|
||||
<NotificationTab />
|
||||
</SafeAreaView>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -20,7 +20,6 @@ import {
|
||||
TouchableOpacity,
|
||||
View,
|
||||
} from 'react-native';
|
||||
import { SafeAreaView } from 'react-native-safe-area-context';
|
||||
|
||||
export default function PersonalInfoScreen() {
|
||||
const router = useRouter();
|
||||
@@ -104,7 +103,7 @@ export default function PersonalInfoScreen() {
|
||||
|
||||
if (isLoading) {
|
||||
return (
|
||||
<SafeAreaView style={[styles.container, { backgroundColor: theme.background }]}>
|
||||
<View style={[styles.container, { backgroundColor: theme.background }]}>
|
||||
<View style={styles.topHeader}>
|
||||
<Pressable onPress={() => setIsEditing(false)}>
|
||||
<ArrowLeft color={theme.text} />
|
||||
@@ -115,12 +114,10 @@ export default function PersonalInfoScreen() {
|
||||
</Pressable>
|
||||
</View>
|
||||
<ActivityIndicator size={'large'} />
|
||||
</SafeAreaView>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
/* ===================== EDIT MODE ===================== */
|
||||
const [showGenderOptions, setShowGenderOptions] = useState(false);
|
||||
if (isEditing && editData) {
|
||||
const genderOptions: { label: string; value: 'male' | 'female' }[] = [
|
||||
{ label: t('Erkak'), value: 'male' },
|
||||
@@ -128,7 +125,7 @@ export default function PersonalInfoScreen() {
|
||||
];
|
||||
|
||||
return (
|
||||
<SafeAreaView style={[styles.container, { backgroundColor: theme.background }]}>
|
||||
<View style={[styles.container, { backgroundColor: theme.background }]}>
|
||||
<View style={styles.topHeader}>
|
||||
<Pressable onPress={() => setIsEditing(false)}>
|
||||
<ArrowLeft color={theme.text} />
|
||||
@@ -225,12 +222,12 @@ export default function PersonalInfoScreen() {
|
||||
</View>
|
||||
</View>
|
||||
</ScrollView>
|
||||
</SafeAreaView>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
/* ===================== VIEW MODE ===================== */
|
||||
return (
|
||||
<SafeAreaView style={[styles.container, { backgroundColor: theme.background }]}>
|
||||
<View style={[styles.container, { backgroundColor: theme.background }]}>
|
||||
<View style={styles.topHeader}>
|
||||
<Pressable onPress={() => router.push('/profile')}>
|
||||
<ArrowLeft color={theme.text} />
|
||||
@@ -324,13 +321,14 @@ export default function PersonalInfoScreen() {
|
||||
</View>
|
||||
</View>
|
||||
</ScrollView>
|
||||
</SafeAreaView>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
container: {
|
||||
flex: 1,
|
||||
paddingBottom: 30,
|
||||
},
|
||||
fieldsContainer: { flexDirection: 'row', flexWrap: 'wrap', gap: 8, marginBottom: 20 },
|
||||
fieldChip: {
|
||||
|
||||
@@ -10,7 +10,6 @@ import { useRouter } from 'expo-router';
|
||||
import { ChevronLeft, Moon, Sun } from 'lucide-react-native';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Pressable, ScrollView, StyleSheet, Switch, Text, View } from 'react-native';
|
||||
import { SafeAreaView } from 'react-native-safe-area-context';
|
||||
|
||||
export default function SettingsScreen() {
|
||||
const router = useRouter();
|
||||
@@ -21,7 +20,7 @@ export default function SettingsScreen() {
|
||||
const selectLanguage = async (lang: string) => {
|
||||
changeLanguage(lang as 'uz' | 'ru' | 'en');
|
||||
await i18n.changeLanguage(lang);
|
||||
queryClient.invalidateQueries();
|
||||
queryClient.resetQueries();
|
||||
await saveLang(lang);
|
||||
};
|
||||
const { isDark, toggleTheme } = useTheme();
|
||||
@@ -33,7 +32,7 @@ export default function SettingsScreen() {
|
||||
];
|
||||
|
||||
return (
|
||||
<SafeAreaView style={[styles.container, isDark ? styles.darkBg : styles.lightBg]}>
|
||||
<View style={[styles.container, isDark ? styles.darkBg : styles.lightBg]}>
|
||||
<ScrollView contentContainerStyle={{ paddingBottom: 32 }}>
|
||||
{/* Header */}
|
||||
<View style={styles.header}>
|
||||
@@ -102,7 +101,7 @@ export default function SettingsScreen() {
|
||||
</View>
|
||||
</View>
|
||||
</ScrollView>
|
||||
</SafeAreaView>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user