complated

This commit is contained in:
Samandar Turgunboyev
2026-02-17 10:46:57 +05:00
parent 754f11804a
commit d747c72c8d
71 changed files with 917 additions and 397 deletions

View File

@@ -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',

View File

@@ -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>
);
}

View File

@@ -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>
);
}

View File

@@ -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>
);
}

View File

@@ -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>
);
}

View File

@@ -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: {

View File

@@ -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>
);
}