This commit is contained in:
Samandar Turgunboyev
2025-09-04 18:38:08 +05:00
parent 9d317290ef
commit f41451c6b8
98 changed files with 1717 additions and 2118 deletions

View File

@@ -114,7 +114,7 @@ async function onDisplayNotification(remoteMessage: any) {
'Matn yoq',
android: {
channelId,
smallIcon: 'ic_launcher_foreground',
largeIcon: 'ic_launcher_foreground',
sound: 'default',
pressAction: {
id: 'default',
@@ -285,7 +285,9 @@ export default function App() {
<Stack.Screen name="PaymentQrCode" component={PaymentQrCode} />
<Stack.Screen name="Profile" component={Profile} />
<Stack.Screen name="Settings" component={Settings} />
{Platform.OS === 'android' && (
<Stack.Screen name="Notifications" component={Notifications} />
)}
<Stack.Screen name="Warehouses" component={Warehouses} />
<Stack.Screen name="Support" component={Support} />
<Stack.Screen name="ListBranches" component={ListBranches} />

View File

@@ -1,7 +1,6 @@
apply plugin: "com.android.application"
apply plugin: "org.jetbrains.kotlin.android"
apply plugin: "com.facebook.react"
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
/**
* This is the configuration block to customize your React Native Android app.
@@ -86,8 +85,8 @@ android {
applicationId "uz.felix.cpost"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 3
versionName "0.3"
versionCode 4
versionName "0.4"
multiDexEnabled true
vectorDrawables.useSupportLibrary = true

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,29 @@
{
"migIndex": 1,
"data": [
{
"path": "assets/fonts/GolosText-Black.ttf",
"sha1": "e6722eaddeeabed103be8b1118c6f95df427fa8b"
},
{
"path": "assets/fonts/GolosText-Bold.ttf",
"sha1": "551718ded281a8d4183a6177ae49c3253721a430"
},
{
"path": "assets/fonts/GolosText-ExtraBold.ttf",
"sha1": "f2f3712a3f91ebe32524efa14df5d832b65c3409"
},
{
"path": "assets/fonts/GolosText-Medium.ttf",
"sha1": "f984e30c8b0362809380a6c36a11dd219fa4e4ca"
},
{
"path": "assets/fonts/GolosText-Regular.ttf",
"sha1": "48870644b5ac1f213fe5422ade65f3e3163b1ae0"
},
{
"path": "assets/fonts/GolosText-SemiBold.ttf",
"sha1": "f9c8af5f76e6fdf4ce77eac72ea5fadf296ecefc"
}
]
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -29,7 +29,7 @@ messaging().setBackgroundMessageHandler(async remoteMessage => {
'Matn yoq',
android: {
channelId,
smallIcon: 'ic_launcher',
largeIcon: 'ic_launcher_foreground',
sound: 'default',
pressAction: {
id: 'default',

View File

@@ -12,6 +12,12 @@
761780ED2CA45674006654EE /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 761780EC2CA45674006654EE /* AppDelegate.swift */; };
81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; };
CEF180279D89A214CE1D1A56 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */; };
C4FA443D7B874C5591EE5A24 /* GolosText-Black.ttf in Resources */ = {isa = PBXBuildFile; fileRef = DBA376D1D07543FDBD9DEA11 /* GolosText-Black.ttf */; };
D2E5D175A94F48ED90CA2608 /* GolosText-Bold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = A1684FE1A56840B488CFA0E8 /* GolosText-Bold.ttf */; };
9AD72184E50F42369259E4EC /* GolosText-ExtraBold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 72C2AFC5B4934788BD5C73B3 /* GolosText-ExtraBold.ttf */; };
5C74F28B61464A939C6BC8E9 /* GolosText-Medium.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 860701A2063545D18EB20379 /* GolosText-Medium.ttf */; };
2DF5B129960A483591501792 /* GolosText-Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 3015B60A17ED4B2F81A772B6 /* GolosText-Regular.ttf */; };
E6BDDBE6D26D47ADACA19701 /* GolosText-SemiBold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 7FEFB3AFCAB24FA39CAF6EE3 /* GolosText-SemiBold.ttf */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
@@ -25,6 +31,12 @@
761780EC2CA45674006654EE /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = AppDelegate.swift; path = first/AppDelegate.swift; sourceTree = "<group>"; };
81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = first/LaunchScreen.storyboard; sourceTree = "<group>"; };
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
DBA376D1D07543FDBD9DEA11 /* GolosText-Black.ttf */ = {isa = PBXFileReference; name = "GolosText-Black.ttf"; path = "../assets/fonts/GolosText-Black.ttf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
A1684FE1A56840B488CFA0E8 /* GolosText-Bold.ttf */ = {isa = PBXFileReference; name = "GolosText-Bold.ttf"; path = "../assets/fonts/GolosText-Bold.ttf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
72C2AFC5B4934788BD5C73B3 /* GolosText-ExtraBold.ttf */ = {isa = PBXFileReference; name = "GolosText-ExtraBold.ttf"; path = "../assets/fonts/GolosText-ExtraBold.ttf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
860701A2063545D18EB20379 /* GolosText-Medium.ttf */ = {isa = PBXFileReference; name = "GolosText-Medium.ttf"; path = "../assets/fonts/GolosText-Medium.ttf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
3015B60A17ED4B2F81A772B6 /* GolosText-Regular.ttf */ = {isa = PBXFileReference; name = "GolosText-Regular.ttf"; path = "../assets/fonts/GolosText-Regular.ttf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
7FEFB3AFCAB24FA39CAF6EE3 /* GolosText-SemiBold.ttf */ = {isa = PBXFileReference; name = "GolosText-SemiBold.ttf"; path = "../assets/fonts/GolosText-SemiBold.ttf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -75,6 +87,7 @@
83CBBA001A601CBA00E9B192 /* Products */,
2D16E6871FA4F8E400B85C8A /* Frameworks */,
BBD78D7AC51CEA395F1C20DB /* Pods */,
9B5408F660B24B4A8E6C28A9 /* Resources */,
);
indentWidth = 2;
sourceTree = "<group>";
@@ -98,6 +111,20 @@
path = Pods;
sourceTree = "<group>";
};
9B5408F660B24B4A8E6C28A9 /* Resources */ = {
isa = "PBXGroup";
children = (
DBA376D1D07543FDBD9DEA11 /* GolosText-Black.ttf */,
A1684FE1A56840B488CFA0E8 /* GolosText-Bold.ttf */,
72C2AFC5B4934788BD5C73B3 /* GolosText-ExtraBold.ttf */,
860701A2063545D18EB20379 /* GolosText-Medium.ttf */,
3015B60A17ED4B2F81A772B6 /* GolosText-Regular.ttf */,
7FEFB3AFCAB24FA39CAF6EE3 /* GolosText-SemiBold.ttf */,
);
name = Resources;
sourceTree = "<group>";
path = "";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
@@ -161,6 +188,12 @@
81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */,
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
CEF180279D89A214CE1D1A56 /* PrivacyInfo.xcprivacy in Resources */,
C4FA443D7B874C5591EE5A24 /* GolosText-Black.ttf in Resources */,
D2E5D175A94F48ED90CA2608 /* GolosText-Bold.ttf in Resources */,
9AD72184E50F42369259E4EC /* GolosText-ExtraBold.ttf in Resources */,
5C74F28B61464A939C6BC8E9 /* GolosText-Medium.ttf in Resources */,
2DF5B129960A483591501792 /* GolosText-Regular.ttf in Resources */,
E6BDDBE6D26D47ADACA19701 /* GolosText-SemiBold.ttf in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};

View File

@@ -59,5 +59,14 @@
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>UIAppFonts</key>
<array>
<string>GolosText-Black.ttf</string>
<string>GolosText-Bold.ttf</string>
<string>GolosText-ExtraBold.ttf</string>
<string>GolosText-Medium.ttf</string>
<string>GolosText-Regular.ttf</string>
<string>GolosText-SemiBold.ttf</string>
</array>
</dict>
</plist>

View File

@@ -0,0 +1,29 @@
{
"migIndex": 1,
"data": [
{
"path": "assets/fonts/GolosText-Black.ttf",
"sha1": "e6722eaddeeabed103be8b1118c6f95df427fa8b"
},
{
"path": "assets/fonts/GolosText-Bold.ttf",
"sha1": "551718ded281a8d4183a6177ae49c3253721a430"
},
{
"path": "assets/fonts/GolosText-ExtraBold.ttf",
"sha1": "f2f3712a3f91ebe32524efa14df5d832b65c3409"
},
{
"path": "assets/fonts/GolosText-Medium.ttf",
"sha1": "f984e30c8b0362809380a6c36a11dd219fa4e4ca"
},
{
"path": "assets/fonts/GolosText-Regular.ttf",
"sha1": "48870644b5ac1f213fe5422ade65f3e3163b1ae0"
},
{
"path": "assets/fonts/GolosText-SemiBold.ttf",
"sha1": "f9c8af5f76e6fdf4ce77eac72ea5fadf296ecefc"
}
]
}

933
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -18,66 +18,42 @@
"@react-native-async-storage/async-storage": "^2.2.0",
"@react-native-clipboard/clipboard": "^1.16.3",
"@react-native-community/datetimepicker": "^8.4.2",
"@react-native-community/geolocation": "^3.4.0",
"@react-native-community/image-editor": "^4.3.0",
"@react-native-community/push-notification-ios": "^1.11.0",
"@react-native-firebase/app": "^23.2.0",
"@react-native-firebase/messaging": "^23.2.0",
"@react-native-picker/picker": "^2.11.1",
"@react-native/new-app-screen": "0.80.1",
"@react-navigation/native": "^7.1.17",
"@react-navigation/native-stack": "^7.3.25",
"@shopify/react-native-skia": "^2.2.2",
"@tanstack/react-query": "^5.84.2",
"axios": "^1.11.0",
"date-fns": "^4.1.0",
"i18next": "^25.3.2",
"i18next-browser-languagedetector": "^8.2.0",
"i18next-http-backend": "^3.0.2",
"link": "^2.1.1",
"lottie-react-native": "^7.3.0",
"react": "19.1.0",
"react-hook-form": "^7.61.1",
"react-i18next": "^15.6.1",
"react-native": "^0.80.1",
"react-native-app-link": "^1.0.1",
"react-native-asset": "^2.1.1",
"react-native-biometrics": "^3.0.1",
"react-native-config": "^1.5.6",
"react-native-confirmation-code-field": "^8.0.1",
"react-native-device-info": "^14.0.4",
"react-native-dotenv": "^3.4.11",
"react-native-fs": "^2.20.0",
"react-native-geolocation-service": "^5.3.1",
"react-native-gesture-handler": "^2.28.0",
"react-native-gesture-password": "^0.4.0",
"react-native-haptic-feedback": "^2.3.3",
"react-native-image-crop-picker": "^0.50.1",
"react-native-image-picker": "^8.2.1",
"react-native-keychain": "^10.0.0",
"react-native-linear-gradient": "^2.8.3",
"react-native-localize": "^3.5.1",
"react-native-maps": "^1.25.0",
"react-native-mask-input": "^1.2.3",
"react-native-mask-text": "^0.15.0",
"react-native-modal": "^14.0.0-rc.1",
"react-native-modal-datetime-picker": "^18.0.0",
"react-native-permissions": "^5.4.2",
"react-native-photo-manipulator": "^1.9.2",
"react-native-push-notification": "^8.1.1",
"react-native-reanimated": "^4.0.2",
"react-native-reanimated-carousel": "^4.0.2",
"react-native-safe-area-context": "^5.6.0",
"react-native-screens": "^4.14.1",
"react-native-screens": "^4.15.4",
"react-native-send-intent": "^1.3.0",
"react-native-share": "^12.2.0",
"react-native-skia": "^0.0.1",
"react-native-smooth-pincode-input": "^1.0.9",
"react-native-splash-screen": "^3.3.0",
"react-native-svg": "^15.12.1",
"react-native-toast-message": "^2.3.3",
"react-native-vector-icons": "^10.3.0",
"react-native-webview": "^13.15.0",
"react-native-worklets": "^0.4.1",
"react-native-worklets": "0.4.1",
"zod": "^4.0.10",
"zustand": "^5.0.6"
},

12
react-native.config.js Normal file
View File

@@ -0,0 +1,12 @@
module.exports = {
project: {
ios: {},
android: {},
},
dependencies: {
...(process.env.NO_FLIPPER
? { 'react-native-flipper': { platforms: { ios: null } } }
: {}),
},
assets: ['./assets/fonts'],
};

View File

@@ -1,24 +1,30 @@
"use client"
'use client';
import React, { useEffect, useRef, useMemo, useCallback } from "react"
import { View, Animated, StyleSheet } from "react-native"
import React, { useCallback, useEffect, useMemo, useRef } from 'react';
import { Animated, StyleSheet, View } from 'react-native';
const AnimatedDots = () => {
const dot1 = useRef(new Animated.Value(0)).current
const dot2 = useRef(new Animated.Value(0)).current
const dot3 = useRef(new Animated.Value(0)).current
const dot1 = useRef(new Animated.Value(0)).current;
const dot2 = useRef(new Animated.Value(0)).current;
const dot3 = useRef(new Animated.Value(0)).current;
const animationConfig = useMemo(() => ({
const animationConfig = useMemo(
() => ({
duration: 300,
useNativeDriver: true,
}), []);
}),
[],
);
const createTimingAnimation = useCallback((value: Animated.Value, toValue: number) => {
const createTimingAnimation = useCallback(
(value: Animated.Value, toValue: number) => {
return Animated.timing(value, {
toValue,
...animationConfig,
});
}, [animationConfig]);
},
[animationConfig],
);
const animationSequence = useMemo(() => {
return Animated.sequence([
@@ -45,8 +51,8 @@ const AnimatedDots = () => {
<Animated.View style={[styles.dot, { opacity: dot2 }]} />
<Animated.View style={[styles.dot, { opacity: dot3 }]} />
</View>
)
}
);
};
const styles = StyleSheet.create({
container: {

View File

@@ -1,37 +1,49 @@
"use client"
'use client';
import React, { useEffect, useRef, useMemo, useCallback } from 'react'
import { Animated, Easing, StyleSheet } from 'react-native'
import React, { useCallback, useEffect, useMemo } from 'react';
import { Animated, Easing, StyleSheet } from 'react-native';
interface AnimatedScreenProps {
children: React.ReactNode
keyIndex: number
children: React.ReactNode;
keyIndex: number;
}
const AnimatedScreen: React.FC<AnimatedScreenProps> = ({ children, keyIndex }) => {
const opacityAnim = React.useRef(new Animated.Value(1)).current // Start with opacity 1
const slideAnim = React.useRef(new Animated.Value(0)).current // Start with no slide
const AnimatedScreen: React.FC<AnimatedScreenProps> = ({
children,
keyIndex,
}) => {
const opacityAnim = React.useRef(new Animated.Value(1)).current; // Start with opacity 1
const slideAnim = React.useRef(new Animated.Value(0)).current; // Start with no slide
const animationConfig = useMemo(() => ({
const animationConfig = useMemo(
() => ({
duration: 150, // Further reduced
useNativeDriver: true,
}), []);
}),
[],
);
const opacityAnimation = useMemo(() =>
const opacityAnimation = useMemo(
() =>
Animated.timing(opacityAnim, {
toValue: 1,
duration: 150, // Further reduced
easing: Easing.out(Easing.ease),
useNativeDriver: true,
}), [opacityAnim]);
}),
[opacityAnim],
);
const slideAnimation = useMemo(() =>
const slideAnimation = useMemo(
() =>
Animated.timing(slideAnim, {
toValue: 0,
duration: 150, // Further reduced
easing: Easing.out(Easing.ease),
useNativeDriver: true,
}), [slideAnim]);
}),
[slideAnim],
);
const resetAnimations = useCallback(() => {
opacityAnim.setValue(1); // Start with full opacity
@@ -48,24 +60,27 @@ const AnimatedScreen: React.FC<AnimatedScreenProps> = ({ children, keyIndex }) =
startAnimations();
}, [keyIndex, resetAnimations, startAnimations]);
const animatedStyle = useMemo(() => ({
const animatedStyle = useMemo(
() => ({
opacity: 1, // Always full opacity
transform: [
{ translateX: 0 }, // No slide
],
}), []);
}),
[],
);
return (
<Animated.View style={[styles.container, animatedStyle]}>
{children}
</Animated.View>
)
}
);
};
const styles = StyleSheet.create({
container: {
flex: 1,
},
})
});
export default AnimatedScreen;

View File

@@ -0,0 +1,8 @@
import React from 'react';
import { Text, TextProps } from 'react-native';
export default function AppText({ style, ...props }: TextProps) {
return (
<Text {...props} style={[{ fontFamily: 'GolosText-Regular' }, style]} />
);
}

View File

@@ -6,7 +6,6 @@ import {
Modal,
ScrollView,
StyleSheet,
Text,
TouchableOpacity,
View,
} from 'react-native';
@@ -16,6 +15,7 @@ import Clock from 'svg/Clock';
import CloseIcon from 'svg/Close';
import Location from 'svg/Location';
import Phone from 'svg/Phone';
import AppText from './AppText';
type BottomModalProps = {
visible: boolean;
@@ -59,8 +59,8 @@ const BottomModal: React.FC<BottomModalProps> = ({
<View style={styles.row}>
<Location color="#28A7E8" width={26} height={26} />
<View style={styles.cardText}>
<Text style={styles.label}>{t('Manzil')}</Text>
<Text style={styles.value}>{branch?.address}</Text>
<AppText style={styles.label}>{t('Manzil')}</AppText>
<AppText style={styles.value}>{branch?.address}</AppText>
</View>
</View>
</View>
@@ -68,8 +68,8 @@ const BottomModal: React.FC<BottomModalProps> = ({
<View style={styles.row}>
<Clock color="#28A7E8" width={26} height={26} />
<View style={styles.cardText}>
<Text style={styles.label}>{t('Ish vaqti')}</Text>
<Text style={styles.value}>{branch?.workingHours}</Text>
<AppText style={styles.label}>{t('Ish vaqti')}</AppText>
<AppText style={styles.value}>{branch?.workingHours}</AppText>
</View>
</View>
</View>
@@ -77,8 +77,8 @@ const BottomModal: React.FC<BottomModalProps> = ({
<View style={styles.row}>
<Phone color="#28A7E8" width={26} height={26} />
<View style={styles.cardText}>
<Text style={styles.label}>{t('Telefon')}</Text>
<Text style={styles.value}>{branch?.phone}</Text>
<AppText style={styles.label}>{t('Telefon')}</AppText>
<AppText style={styles.value}>{branch?.phone}</AppText>
</View>
</View>
</View>
@@ -86,8 +86,10 @@ const BottomModal: React.FC<BottomModalProps> = ({
<View style={styles.row}>
<Image source={Telegram} style={{ width: 26, height: 26 }} />
<View style={styles.cardText}>
<Text style={styles.label}>{t('Telegram admin')}</Text>
<Text style={styles.value}>{branch?.telegramAdmin}</Text>
<AppText style={styles.label}>{t('Telegram admin')}</AppText>
<AppText style={styles.value}>
{branch?.telegramAdmin}
</AppText>
</View>
</View>
</View>
@@ -95,8 +97,10 @@ const BottomModal: React.FC<BottomModalProps> = ({
<View style={styles.row}>
<Image source={Telegram} style={{ width: 26, height: 26 }} />
<View style={styles.cardText}>
<Text style={styles.label}>{t('Telegram kanal')}</Text>
<Text style={styles.value}>{branch?.telegramChannel}</Text>
<AppText style={styles.label}>{t('Telegram kanal')}</AppText>
<AppText style={styles.value}>
{branch?.telegramChannel}
</AppText>
</View>
</View>
</View>
@@ -154,7 +158,7 @@ const styles = StyleSheet.create({
},
label: {
fontSize: 16,
fontWeight: '600',
fontFamily: 'GolosText-Bold',
color: '#000000',
},
value: {

View File

@@ -1,34 +1,35 @@
import React, { useMemo, useCallback } from 'react';
import { StyleSheet, Text, useWindowDimensions, View } from 'react-native';
import React, { useCallback, useMemo } from 'react';
import { StyleSheet, useWindowDimensions, View } from 'react-native';
import AppText from './AppText';
export const toastConfig = {
success: ({ text1, text2 }: { text1?: string; text2?: string }) => {
const { width: screenWidth } = useWindowDimensions();
const scale = useMemo(() => screenWidth < 360 ? 0.85 : 1, [screenWidth]);
const scale = useMemo(() => (screenWidth < 360 ? 0.85 : 1), [screenWidth]);
const containerStyle = useMemo(() => [
styles.toastContainer,
{ padding: 10 * scale }
], [scale]);
const containerStyle = useMemo(
() => [styles.toastContainer, { padding: 10 * scale }],
[scale],
);
const text1Style = useMemo(() => [
styles.text1,
{ fontSize: 16 * scale }
], [scale]);
const text1Style = useMemo(
() => [styles.text1, { fontSize: 16 * scale }],
[scale],
);
const text2Style = useMemo(() => [
styles.text2,
{ fontSize: 14 * scale }
], [scale]);
const text2Style = useMemo(
() => [styles.text2, { fontSize: 14 * scale }],
[scale],
);
const renderText2 = useCallback(() => {
if (!text2) return null;
return <Text style={text2Style}>{text2}</Text>;
return <AppText style={text2Style}>{text2}</AppText>;
}, [text2, text2Style]);
return (
<View style={containerStyle}>
<Text style={text1Style}>{text1}</Text>
<AppText style={text1Style}>{text1}</AppText>
{renderText2()}
</View>
);

View File

@@ -4,10 +4,10 @@ import {
Modal,
Platform,
StyleSheet,
Text,
TouchableOpacity,
View,
} from 'react-native';
import AppText from './AppText';
type Props = {
value: Date;
@@ -55,7 +55,7 @@ const DatePickerInput = ({
onPress={handleClosePicker}
style={styles.doneButton}
>
<Text style={styles.doneText}>Done</Text>
<AppText style={styles.doneText}>Done</AppText>
</TouchableOpacity>
</View>
</View>
@@ -113,7 +113,7 @@ const styles = StyleSheet.create({
color: '#555',
},
boldText: {
fontWeight: '600',
fontFamily: 'GolosText-Bold',
},
modalContainer: {
flex: 1,
@@ -133,7 +133,7 @@ const styles = StyleSheet.create({
},
doneText: {
color: '#007AFF',
fontWeight: '600',
fontFamily: 'GolosText-Bold',
fontSize: 16,
},
});

View File

@@ -1,13 +1,6 @@
import React, { useCallback, useMemo, useState } from 'react';
import { useTranslation } from 'react-i18next';
import {
Alert,
Image,
StyleSheet,
Text,
TouchableOpacity,
View,
} from 'react-native';
import { Alert, Image, StyleSheet, TouchableOpacity, View } from 'react-native';
import {
Asset,
ImagePickerResponse,
@@ -15,6 +8,7 @@ import {
MediaType,
} from 'react-native-image-picker';
import Download from 'svg/Download';
import AppText from './AppText';
export interface FileData {
uri: string;
@@ -107,17 +101,19 @@ const SingleFileDrop: React.FC<SingleFileDropProps> = ({
<View style={styles.innerContainer}>
<View style={styles.topContent}>
<UploadIcon />
<Text style={styles.sectionTitle}>{title}</Text>
<AppText style={styles.sectionTitle}>{title}</AppText>
</View>
<View style={styles.bottomContent}>
<View style={styles.dividerContainer}>
<View style={styles.dividerLine} />
<Text style={styles.orDividerText}>OR</Text>
<AppText style={styles.orDividerText}>OR</AppText>
<View style={styles.dividerLine} />
</View>
<View style={styles.browseButton}>
<Text style={styles.browseButtonText}>{t('Faylni yuklang')}</Text>
<AppText style={styles.browseButtonText}>
{t('Faylni yuklang')}
</AppText>
</View>
</View>
</View>
@@ -158,6 +154,7 @@ const styles = StyleSheet.create({
fontSize: 16,
fontWeight: '500',
color: '#333',
textAlign: 'center',
marginBottom: 10,
},
browseButton: {
@@ -169,6 +166,7 @@ const styles = StyleSheet.create({
browseButtonText: {
color: '#28A7E8',
fontSize: 14,
textAlign: 'center',
fontWeight: '500',
},
previewImage: {

View File

@@ -1,18 +1,12 @@
// components/GlobalModal.tsx
import React from 'react';
import { Modal, View, Text, StyleSheet, TouchableOpacity } from 'react-native';
import { Modal, StyleSheet, TouchableOpacity, View } from 'react-native';
import { useModalStore } from 'screens/auth/registeration/lib/modalStore';
import AppText from './AppText';
const GlobalModal = () => {
const {
isVisible,
title,
message,
type,
onConfirm,
onCancel,
closeModal,
} = useModalStore();
const { isVisible, title, message, type, onConfirm, onCancel, closeModal } =
useModalStore();
return (
<Modal
@@ -23,13 +17,18 @@ const GlobalModal = () => {
>
<View style={styles.overlay}>
<View style={styles.modal}>
<Text style={styles.title}>{title}</Text>
<Text style={styles.message}>{message}</Text>
<AppText style={styles.title}>{title}</AppText>
<AppText style={styles.message}>{message}</AppText>
<View style={styles.buttons}>
{onCancel && (
<TouchableOpacity onPress={() => { onCancel(); closeModal(); }}>
<Text style={styles.cancel}>Bekor qilish</Text>
<TouchableOpacity
onPress={() => {
onCancel();
closeModal();
}}
>
<AppText style={styles.cancel}>Bekor qilish</AppText>
</TouchableOpacity>
)}
<TouchableOpacity
@@ -38,7 +37,7 @@ const GlobalModal = () => {
closeModal();
}}
>
<Text style={styles.confirm}>Ok</Text>
<AppText style={styles.confirm}>Ok</AppText>
</TouchableOpacity>
</View>
</View>

View File

@@ -1,6 +1,7 @@
import React, { useMemo, useCallback } from 'react';
import { Modal, StyleSheet, View, TouchableOpacity, Text } from 'react-native';
import React, { useCallback, useMemo } from 'react';
import { Modal, StyleSheet, TouchableOpacity, View } from 'react-native';
import { WebView } from 'react-native-webview';
import AppText from './AppText';
type Props = {
visible: boolean;
@@ -19,7 +20,7 @@ const InAppBrowser = ({ visible, url, onClose }: Props) => {
<Modal visible={visible} animationType="slide">
<View style={styles.container}>
<TouchableOpacity style={styles.closeButton} onPress={handleClose}>
<Text style={styles.closeText}>Yopish</Text>
<AppText style={styles.closeText}>Yopish</AppText>
</TouchableOpacity>
<WebView source={webViewSource} />
</View>

View File

@@ -5,8 +5,8 @@ import {
Dimensions,
Image,
Linking,
Platform,
StyleSheet,
Text,
TouchableOpacity,
View,
} from 'react-native';
@@ -16,6 +16,7 @@ import Logo from 'screens/../../assets/bootsplash/logo.png';
import Bell from 'svg/Bell';
import Instagram from 'svg/Instagram';
import Telegram from 'svg/Telegram';
import AppText from './AppText';
import InAppBrowser from './InAppBrowser';
const { width } = Dimensions.get('window');
@@ -77,7 +78,7 @@ const Navbar = () => {
<View style={[styles.header, { marginTop: top }]}>
<View style={styles.logo}>
<Image source={Logo} style={styles.logoImage} />
<Text style={styles.title}>CPOST</Text>
<AppText style={styles.title}>CPOST</AppText>
</View>
<View style={styles.links}>
@@ -96,13 +97,14 @@ const Navbar = () => {
size={iconSizes.facebook}
/>
</TouchableOpacity> */}
{Platform.OS === 'android' && (
<TouchableOpacity
onPress={() => navigation.navigate('Notifications')}
>
<Bell color="#fff" width={24} height={24} />
{/* <View style={styles.bellDot} /> */}
</TouchableOpacity>
)}
</View>
</View>

View File

@@ -1,9 +1,10 @@
import { useNavigation } from '@react-navigation/native';
import { NativeStackNavigationProp } from '@react-navigation/native-stack';
import * as React from 'react';
import { StyleSheet, Text, TouchableOpacity, View } from 'react-native';
import { StyleSheet, TouchableOpacity, View } from 'react-native';
import { useSafeAreaInsets } from 'react-native-safe-area-context';
import ArrowLeft from 'svg/ArrowLeft';
import AppText from './AppText';
interface NavbarBackProps {
title: string;
@@ -17,7 +18,7 @@ const NavbarBack = ({ title }: NavbarBackProps) => {
<TouchableOpacity onPress={() => navigation.goBack()}>
<ArrowLeft color="#fff" width={20} height={20} />
</TouchableOpacity>
<Text style={styles.headerTitle}>{title}</Text>
<AppText style={styles.headerTitle}>{title}</AppText>
</View>
);
};
@@ -36,7 +37,7 @@ const styles = StyleSheet.create({
headerTitle: {
color: '#fff',
fontSize: 20,
fontWeight: '600',
fontFamily: 'GolosText-Bold',
marginLeft: 8,
},
});

View File

@@ -2,13 +2,7 @@ import { useNavigation, useRoute } from '@react-navigation/native';
import type { NativeStackNavigationProp } from '@react-navigation/native-stack';
import React, { useCallback, useMemo } from 'react';
import { useTranslation } from 'react-i18next';
import {
Dimensions,
StyleSheet,
Text,
TouchableOpacity,
View,
} from 'react-native';
import { Dimensions, StyleSheet, TouchableOpacity, View } from 'react-native';
import { useSafeAreaInsets } from 'react-native-safe-area-context';
import HomeIcon from 'svg/HomeIcon';
@@ -16,6 +10,7 @@ import Passport from 'svg/Passport';
import StatusIcon from 'svg/StatusIcon';
import User from 'svg/User';
import Wallet from 'svg/Wallet';
import AppText from './AppText';
const { width } = Dimensions.get('window');
const isSmallScreen = width < 360;
@@ -65,7 +60,7 @@ const Navigation = () => {
activeOpacity={0.7}
>
<Icon color={color} width={iconSize} height={iconSize} />
<Text
<AppText
style={{
color,
fontWeight: '500',
@@ -73,7 +68,7 @@ const Navigation = () => {
}}
>
{t(label)}
</Text>
</AppText>
</TouchableOpacity>
);
},

View File

@@ -1,14 +1,9 @@
import LottieView from 'lottie-react-native';
import React, { useEffect, useRef } from 'react';
import { useTranslation } from 'react-i18next';
import {
Animated,
StyleSheet,
Text,
useWindowDimensions,
View,
} from 'react-native';
import { Animated, StyleSheet, useWindowDimensions, View } from 'react-native';
import ProgressBar from 'screens/../../assets/lottie/Empty box.json';
import AppText from './AppText';
interface Props {
message?: string;
@@ -58,7 +53,7 @@ const NoResult: React.FC<Props> = ({
resizeMode="cover"
style={{ width: 250 * scale, height: 250 * scale }}
/>
<Text>{t(message)}</Text>
<AppText>{t(message)}</AppText>
</View>
);
};

View File

@@ -1,8 +1,9 @@
// components/Pagination.tsx
import React from 'react';
import { Text, TouchableOpacity, View } from 'react-native';
import { TouchableOpacity, View } from 'react-native';
import ArrowLeft from 'svg/ArrowLeft';
import ArrowRightUnderline from 'svg/ArrowRightUnderline';
import AppText from './AppText';
interface PaginationProps {
page: number; // current page (0-based)
@@ -52,9 +53,9 @@ const Pagination: React.FC<PaginationProps> = ({
return pages.map((p, index) => {
if (p === '...') {
return (
<Text key={`dots-${index}`} style={{ marginHorizontal: 5 }}>
<AppText key={`dots-${index}`} style={{ marginHorizontal: 5 }}>
...
</Text>
</AppText>
);
}
return (
@@ -71,9 +72,9 @@ const Pagination: React.FC<PaginationProps> = ({
marginHorizontal: 5,
}}
>
<Text style={{ color: page === p ? '#fff' : '#000' }}>
<AppText style={{ color: page === p ? '#fff' : '#000' }}>
{(p as number) + 1}
</Text>
</AppText>
</TouchableOpacity>
);
});

View File

@@ -3,11 +3,11 @@ import {
Animated,
Image,
StyleSheet,
Text,
useWindowDimensions,
View,
} from 'react-native';
import Logo from 'screens/../../assets/bootsplash/logo.png';
import AppText from './AppText';
const SplashScreen = ({ onFinish }: { onFinish: () => void }) => {
const { width: screenWidth, height: screenHeight } = useWindowDimensions();
@@ -136,9 +136,9 @@ const SplashScreen = ({ onFinish }: { onFinish: () => void }) => {
resizeMode="contain"
/>
<View style={[styles.brandText, brandTextStyles]}>
<Text style={[styles.brand, { fontSize: brandFontSize }]}>
<AppText style={[styles.brand, { fontSize: brandFontSize }]}>
CPOST
</Text>
</AppText>
</View>
</View>
</View>

View File

@@ -172,6 +172,9 @@
"Yopish": "Закрыть",
"Manzilingizni kiriting": "Введите свой адрес",
"Toshkent Shahri, Mirzo Ulug'bek tumani...": "г. Ташкент, Мирзо-Улугбекский район...",
"Hurmatli mijoz, ushbu berilgan ID manzil, ma'lumotlarni siz shu namunadagidek 1- va 4- qatorlarga oʻz ID kodingizni yozing! Aks holda sizning kargoingiz bilan muammo chiqishi mumkin.": "Уважаемый клиент, пожалуйста, введите свой ID-код в строки 1 и 4, как показано в этом примере, с данным ID-адресом и информацией! В противном случае может возникнуть проблема с вашим грузом.",
"Ilovaga kirib huddi shunday toldirganingizdan keyin ekranni rasmga(skrinshot) olib, sizga bot tomonidan berilgan ID kod vamanzilni ushbu": "После того, как вы вошли в приложение и заполнили его таким же образом, сделайте снимок экрана и запишите код удостоверения личности и адрес, предоставленные вам ботом, в",
"admindan tasdiqlatib olishingiz kerak boladi.": "вам нужно будет получить подтверждение от администратора.",
"Passportlarim": "Мои паспорта",
"Hali pasport qo'shilmagan": "Паспорт еще не добавлен",
"Yangi pasport qo'shish uchun tugmani bosing": "Нажмите кнопку, чтобы добавить новый паспорт",

View File

@@ -18,7 +18,10 @@
"Ro'yxatdan o'tish": "Ro'yxatdan o'tish",
"Manzilingizni kiriting": "Manzilingizni kiriting",
"Toshkent Shahri, Mirzo Ulug'bek tumani...": "Toshkent Shahri, Mirzo Ulug'bek tumani...",
"Hurmatli mijoz, ushbu berilgan ID manzil, ma'lumotlarni siz shu namunadagidek 1- va 4- qatorlarga oʻz ID kodingizni yozing! Aks holda sizning kargoingiz bilan muammo chiqishi mumkin.": "Hurmatli mijoz, ushbu berilgan ID manzil, ma'lumotlarni siz shu namunadagidek 1- va 4- qatorlarga oʻz ID kodingizni yozing! Aks holda sizning kargoingiz bilan muammo chiqishi mumkin.",
"Ilovaga kirib huddi shunday toldirganingizdan keyin ekranni rasmga(skrinshot) olib, sizga bot tomonidan berilgan ID kod vamanzilni ushbu": "Ilovaga kirib huddi shunday toldirganingizdan keyin ekranni rasmga(skrinshot) olib, sizga bot tomonidan berilgan ID kod vamanzilni ushbu",
"Ism": "Ism",
"admindan tasdiqlatib olishingiz kerak boladi.": "admindan tasdiqlatib olishingiz kerak boladi.",
"Ismingiz": "Ismingiz",
"Familiya": "Familiya",
"Familiyangiz": "Familiyangiz",

View File

@@ -6,6 +6,8 @@ import { NativeStackNavigationProp } from '@react-navigation/native-stack';
import { useMutation } from '@tanstack/react-query';
import { authApi } from 'api/auth';
import { otpPayload, resendPayload } from 'api/auth/type';
import AppText from 'components/AppText';
import formatPhone from 'helpers/formatPhone';
import React, { useEffect, useRef, useState } from 'react';
import { useTranslation } from 'react-i18next';
import {
@@ -14,7 +16,6 @@ import {
KeyboardAvoidingView,
Platform,
StyleSheet,
Text,
TextInput,
TouchableOpacity,
View,
@@ -156,10 +157,10 @@ const Confirm = () => {
style={Loginstyle.background}
resizeMode="contain"
imageStyle={{
opacity: 0.3,
opacity: 0.1,
height: '100%',
width: '100%',
transform: [{ scale: 1.5 }],
transform: [{ scale: 1 }],
}}
>
<SafeAreaView style={{ flex: 1 }}>
@@ -174,11 +175,13 @@ const Confirm = () => {
behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
>
<View style={styles.content}>
<Text style={styles.title}>{t('Tasdiqlash kodini kiriting')}</Text>
<Text style={styles.message}>
{phoneNumber} {t('raqamiga yuborilgan')} {OTP_LENGTH}{' '}
<AppText style={styles.title}>
{t('Tasdiqlash kodini kiriting')}
</AppText>
<AppText style={styles.message}>
{formatPhone(phoneNumber)} {t('raqamiga yuborilgan')} {OTP_LENGTH}{' '}
{t('xonali kodni kiriting.')}{' '}
</Text>
</AppText>
<View style={styles.otpContainer}>
{code.map((digit, index) => (
<TextInput
@@ -195,7 +198,7 @@ const Confirm = () => {
))}
</View>
{errorConfirm && (
<Text style={styles.errorText}>{errorConfirm}</Text>
<AppText style={styles.errorText}>{errorConfirm}</AppText>
)}
<View style={styles.resendContainer}>
{canResend ? (
@@ -203,14 +206,14 @@ const Confirm = () => {
onPress={handleResendCode}
style={styles.resendButton}
>
<Text style={styles.resendButtonText}>
<AppText style={styles.resendButtonText}>
{t('Kodni qayta yuborish')}
</Text>
</AppText>
</TouchableOpacity>
) : (
<Text style={styles.timerText}>
<AppText style={styles.timerText}>
{t('Kodni qayta yuborish vaqti')} ({timer}s)
</Text>
</AppText>
)}
</View>
<TouchableOpacity
@@ -220,14 +223,14 @@ const Confirm = () => {
{isPending ? (
<ActivityIndicator color="#fff" />
) : (
<Text
<AppText
style={[
Loginstyle.btnText,
isPending && styles.buttonTextDisabled,
]}
>
{t('Tasdiqlash')}
</Text>
</AppText>
)}
</TouchableOpacity>
</View>

View File

@@ -7,6 +7,7 @@ import { useMutation, useQuery } from '@tanstack/react-query';
import { authApi } from 'api/auth';
import { loginPayload } from 'api/auth/type';
import { Branch, branchApi } from 'api/branch';
import AppText from 'components/AppText';
import formatPhone from 'helpers/formatPhone';
import React, {
useCallback,
@@ -23,7 +24,6 @@ import {
KeyboardAvoidingView,
Platform,
ScrollView,
Text,
TextInput,
TouchableOpacity,
View,
@@ -156,10 +156,10 @@ const Login = () => {
style={Loginstyle.background}
resizeMode="contain"
imageStyle={{
opacity: 0.3,
opacity: 0.1,
height: '100%',
width: '100%',
transform: [{ scale: 1.5 }],
transform: [{ scale: 1 }],
}}
>
<SafeAreaView style={{ flex: 1 }}>
@@ -176,7 +176,9 @@ const Login = () => {
<ScrollView style={{ flex: 1 }}>
<View style={Loginstyle.scrollContainer}>
<View style={Loginstyle.loginContainer}>
<Text style={Loginstyle.title}>{t('Tizimga kirish')}</Text>
<AppText style={Loginstyle.title}>
{t('Tizimga kirish')}
</AppText>
<Controller
control={control}
name="phone"
@@ -184,9 +186,9 @@ const Login = () => {
const formatted = formatPhone(rawPhone);
return (
<View>
<Text style={Loginstyle.label}>
<AppText style={Loginstyle.label}>
{t('Telefon raqami')}
</Text>
</AppText>
<TextInput
keyboardType="numeric"
placeholder="+998 90 123-45-67"
@@ -197,18 +199,18 @@ const Login = () => {
maxLength={19} // +998 90 123-45-67 bo'lishi uchun
/>
{errors.phone && (
<Text style={Loginstyle.errorText}>
<AppText style={Loginstyle.errorText}>
{t(errors.phone.message || '')}
</Text>
</AppText>
)}
</View>
);
}}
/>
<View>
<Text style={Loginstyle.label}>
<AppText style={Loginstyle.label}>
{t('Passport seriya raqami')}
</Text>
</AppText>
<View style={{ flexDirection: 'row' }}>
<Controller
control={control}
@@ -251,10 +253,10 @@ const Login = () => {
/>
</View>
{(errors.passportSeriya || errors.passportNumber) && (
<Text style={Loginstyle.errorText}>
<AppText style={Loginstyle.errorText}>
{t(errors.passportSeriya?.message || '') ||
t(errors.passportNumber?.message || '')}
</Text>
</AppText>
)}
</View>
@@ -263,7 +265,7 @@ const Login = () => {
name="branchId"
render={({ field: { value } }) => (
<View style={{ position: 'relative' }}>
<Text style={Loginstyle.label}>{t('Filial')}</Text>
<AppText style={Loginstyle.label}>{t('Filial')}</AppText>
<View style={Loginstyle.input}>
<TouchableOpacity
style={Loginstyle.selector}
@@ -271,7 +273,7 @@ const Login = () => {
setFilialDropdownVisible(prev => !prev)
}
>
<Text
<AppText
style={
value
? { color: '#000' }
@@ -280,7 +282,7 @@ const Login = () => {
>
{branchList?.find(e => e.id === value)?.name ||
t('Filialni tanlang...')}
</Text>
</AppText>
{filialDropdownVisible ? (
<ArrowUp color={'#000'} />
) : (
@@ -301,21 +303,23 @@ const Login = () => {
setFilialDropdownVisible(false);
}}
>
<Text style={Loginstyle.dropdownItemText}>
<AppText style={Loginstyle.dropdownItemText}>
{item.name}
</Text>
</AppText>
</TouchableOpacity>
))}
</ScrollView>
</View>
)}
{errors.branchId && (
<Text style={Loginstyle.errorText}>
<AppText style={Loginstyle.errorText}>
{t(errors.branchId.message || '')}
</Text>
</AppText>
)}
{error && (
<Text style={[Loginstyle.errorText]}>{t(error)}</Text>
<AppText style={[Loginstyle.errorText]}>
{t(error)}
</AppText>
)}
</View>
)}
@@ -328,9 +332,9 @@ const Login = () => {
{isPending ? (
<ActivityIndicator color="#fff" />
) : (
<Text style={Loginstyle.btnText}>
<AppText style={Loginstyle.btnText}>
{t('Tizimga kirish')}
</Text>
</AppText>
)}
</TouchableOpacity>
<View
@@ -340,14 +344,14 @@ const Login = () => {
alignItems: 'center',
}}
>
<Text style={{ fontSize: 14, fontWeight: '500' }}>
<AppText style={{ fontSize: 14, fontWeight: '500' }}>
{t('ID va kabinet yoqmi?')}
</Text>
</AppText>
<TouchableOpacity
style={Loginstyle.dropdownItem}
onPress={() => navigation.navigate('Register')}
>
<Text
<AppText
style={{
color: '#28A7E8',
fontSize: 14,
@@ -355,7 +359,7 @@ const Login = () => {
}}
>
{t('Royxatdan otish')}
</Text>
</AppText>
</TouchableOpacity>
</View>
</View>

View File

@@ -36,16 +36,16 @@ export const Loginstyle = StyleSheet.create({
position: 'relative',
},
label: {
fontSize: 12,
fontSize: 14,
fontWeight: '500',
color: '#28A7E8',
color: '#252525ff',
marginBottom: 5,
},
title: {
fontSize: 24,
fontWeight: '600',
fontFamily: 'GolosText-Bold',
textAlign: 'center',
color: '#28A7E8',
color: '#000',
marginBottom: 20,
},
input: {

View File

@@ -6,6 +6,8 @@ import { NativeStackNavigationProp } from '@react-navigation/native-stack';
import { useMutation } from '@tanstack/react-query';
import { authApi } from 'api/auth';
import { otpPayload, resendPayload } from 'api/auth/type';
import AppText from 'components/AppText';
import formatPhone from 'helpers/formatPhone';
import React, { useEffect, useRef, useState } from 'react';
import { useTranslation } from 'react-i18next';
import {
@@ -14,7 +16,6 @@ import {
KeyboardAvoidingView,
Platform,
StyleSheet,
Text,
TextInput,
TouchableOpacity,
View,
@@ -166,10 +167,10 @@ const Confirm = ({
style={RegisterStyle.background}
resizeMode="contain"
imageStyle={{
opacity: 0.3,
opacity: 0.1,
height: '100%',
width: '100%',
transform: [{ scale: 1.5 }],
transform: [{ scale: 1 }],
}}
>
<SafeAreaView style={{ flex: 1 }}>
@@ -184,11 +185,13 @@ const Confirm = ({
behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
>
<View style={styles.content}>
<Text style={styles.title}>{t('Tasdiqlash kodini kiriting')}</Text>
<Text style={styles.message}>
{phoneNumber} {t('raqamiga yuborilgan')} {OTP_LENGTH}{' '}
<AppText style={styles.title}>
{t('Tasdiqlash kodini kiriting')}
</AppText>
<AppText style={styles.message}>
{formatPhone(phoneNumber)} {t('raqamiga yuborilgan')} {OTP_LENGTH}{' '}
{t('xonali kodni kiriting.')}
</Text>
</AppText>
<View style={styles.otpContainer}>
{code.map((digit, index) => (
<TextInput
@@ -207,7 +210,7 @@ const Confirm = ({
))}
</View>
{errorConfirm !== null && (
<Text style={styles.errorText}>{errorConfirm}</Text>
<AppText style={styles.errorText}>{errorConfirm}</AppText>
)}
<View style={styles.resendContainer}>
{canResend ? (
@@ -215,14 +218,14 @@ const Confirm = ({
onPress={handleResendCode}
style={styles.resendButton}
>
<Text style={styles.resendButtonText}>
<AppText style={styles.resendButtonText}>
{t('Kodni qayta yuborish')}
</Text>
</AppText>
</TouchableOpacity>
) : (
<Text style={styles.timerText}>
<AppText style={styles.timerText}>
{t('Kodni qayta yuborish vaqti')} ({timer}s)
</Text>
</AppText>
)}
</View>
<TouchableOpacity
@@ -232,14 +235,14 @@ const Confirm = ({
{isPending ? (
<ActivityIndicator color="#fff" />
) : (
<Text
<AppText
style={[
RegisterStyle.btnText,
isPending && RegisterStyle.buttonTextDisabled,
]}
>
{t('Tasdiqlash')}
</Text>
</AppText>
)}
</TouchableOpacity>
</View>
@@ -350,7 +353,7 @@ const styles = StyleSheet.create({
verifyButtonText: {
color: '#fff',
fontSize: 18,
fontWeight: '600',
fontFamily: 'GolosText-Bold',
},
});

View File

@@ -13,6 +13,7 @@ import { useMutation, useQuery } from '@tanstack/react-query';
import { authApi } from 'api/auth';
import { registerPayload } from 'api/auth/type';
import { Branch, branchApi } from 'api/branch';
import AppText from 'components/AppText';
import formatPhone from 'helpers/formatPhone';
import { useEffect, useState } from 'react';
import { Controller, useForm } from 'react-hook-form';
@@ -24,7 +25,6 @@ import {
KeyboardAvoidingView,
Platform,
ScrollView,
Text,
TextInput,
TouchableOpacity,
View,
@@ -194,10 +194,10 @@ const FirstStep = ({ onNext }: { onNext: () => void }) => {
style={RegisterStyle.background}
resizeMode="contain"
imageStyle={{
opacity: 0.3,
opacity: 0.1,
height: '100%',
width: '100%',
transform: [{ scale: 1.5 }],
transform: [{ scale: 1 }],
}}
>
<SafeAreaView style={{ flex: 1 }}>
@@ -217,16 +217,16 @@ const FirstStep = ({ onNext }: { onNext: () => void }) => {
>
<View style={RegisterStyle.scrollContainer}>
<View style={RegisterStyle.loginContainer}>
<Text style={RegisterStyle.title}>
<AppText style={RegisterStyle.title}>
{t("Ro'yxatdan o'tish")}
</Text>
</AppText>
<Controller
control={control}
name="firstName"
render={({ field: { onChange, value } }) => (
<View>
<Text style={RegisterStyle.label}>{t('Ism')}</Text>
<AppText style={RegisterStyle.label}>{t('Ism')} </AppText>
<TextInput
style={RegisterStyle.input}
placeholder={t('Ismingiz')}
@@ -235,9 +235,9 @@ const FirstStep = ({ onNext }: { onNext: () => void }) => {
placeholderTextColor={'#D8DADC'}
/>
{errors.firstName && (
<Text style={RegisterStyle.errorText}>
<AppText style={RegisterStyle.errorText}>
{t(errors.firstName.message || '')}
</Text>
</AppText>
)}
</View>
)}
@@ -247,7 +247,9 @@ const FirstStep = ({ onNext }: { onNext: () => void }) => {
name="lastName"
render={({ field: { onChange, value } }) => (
<View>
<Text style={RegisterStyle.label}>{t('Familiya')}</Text>
<AppText style={RegisterStyle.label}>
{t('Familiya')}{' '}
</AppText>
<TextInput
style={RegisterStyle.input}
placeholder={t('Familiyangiz')}
@@ -256,9 +258,9 @@ const FirstStep = ({ onNext }: { onNext: () => void }) => {
value={value}
/>
{errors.lastName && (
<Text style={RegisterStyle.errorText}>
<AppText style={RegisterStyle.errorText}>
{t(errors.lastName.message || '')}
</Text>
</AppText>
)}
</View>
)}
@@ -270,9 +272,9 @@ const FirstStep = ({ onNext }: { onNext: () => void }) => {
const formatted = formatPhone(rawPhone);
return (
<View>
<Text style={RegisterStyle.label}>
<AppText style={RegisterStyle.label}>
{t('Telefon raqami')}
</Text>
</AppText>
<TextInput
keyboardType="numeric"
placeholder="+998 __ ___-__-__"
@@ -290,9 +292,9 @@ const FirstStep = ({ onNext }: { onNext: () => void }) => {
maxLength={17}
/>
{errors.phoneNumber && (
<Text style={RegisterStyle.errorText}>
<AppText style={RegisterStyle.errorText}>
{t(errors.phoneNumber.message || '')}
</Text>
</AppText>
)}
</View>
);
@@ -303,7 +305,9 @@ const FirstStep = ({ onNext }: { onNext: () => void }) => {
name="branchId"
render={({ field: { value } }) => (
<View style={{ position: 'relative' }}>
<Text style={RegisterStyle.label}>{t('Filial')}</Text>
<AppText style={RegisterStyle.label}>
{t('Filial')}{' '}
</AppText>
<View style={RegisterStyle.input}>
<TouchableOpacity
style={RegisterStyle.selector}
@@ -311,7 +315,7 @@ const FirstStep = ({ onNext }: { onNext: () => void }) => {
setFilialDropdownVisible(prev => !prev)
}
>
<Text
<AppText
style={
value
? { color: '#000' }
@@ -320,7 +324,7 @@ const FirstStep = ({ onNext }: { onNext: () => void }) => {
>
{branchList?.find(e => e.id === value)?.name ||
t('Filialni tanlang...')}
</Text>
</AppText>
{filialDropdownVisible ? (
<ArrowUp color={'#000'} />
) : (
@@ -343,18 +347,20 @@ const FirstStep = ({ onNext }: { onNext: () => void }) => {
setFilialDropdownVisible(false);
}}
>
<Text style={RegisterStyle.dropdownItemText}>
<AppText
style={RegisterStyle.dropdownItemText}
>
{item.name}
</Text>
</AppText>
</TouchableOpacity>
))}
</ScrollView>
</View>
)}
{errors.branchId && (
<Text style={RegisterStyle.errorText}>
<AppText style={RegisterStyle.errorText}>
{t(errors.branchId.message || '')}
</Text>
</AppText>
)}
</View>
)}
@@ -364,9 +370,9 @@ const FirstStep = ({ onNext }: { onNext: () => void }) => {
name="address"
render={({ field: { onChange, value } }) => (
<View>
<Text style={RegisterStyle.label}>
<AppText style={RegisterStyle.label}>
{t('Manzilingizni kiriting')}
</Text>
</AppText>
<TextInput
style={RegisterStyle.input}
placeholder={t(
@@ -377,9 +383,9 @@ const FirstStep = ({ onNext }: { onNext: () => void }) => {
value={value}
/>
{errors.lastName && (
<Text style={RegisterStyle.errorText}>
<AppText style={RegisterStyle.errorText}>
{t(errors.lastName.message || '')}
</Text>
</AppText>
)}
</View>
)}
@@ -389,9 +395,9 @@ const FirstStep = ({ onNext }: { onNext: () => void }) => {
name="recommend"
render={({ field: { value } }) => (
<View style={{ position: 'relative' }}>
<Text style={RegisterStyle.label}>
<AppText style={RegisterStyle.label}>
{t('Bizni qaerdan topdingiz?')}
</Text>
</AppText>
<View style={RegisterStyle.input}>
<TouchableOpacity
style={RegisterStyle.selector}
@@ -399,7 +405,7 @@ const FirstStep = ({ onNext }: { onNext: () => void }) => {
setRecommendedDropdownVisible(prev => !prev)
}
>
<Text
<AppText
style={
value
? { color: '#000' }
@@ -410,7 +416,7 @@ const FirstStep = ({ onNext }: { onNext: () => void }) => {
recommended.find(e => e.value === value)?.label ||
'Bizni kim tavsiya qildi...',
)}
</Text>
</AppText>
{recommendedDropdownVisible ? (
<ArrowUp color={'#000'} />
) : (
@@ -432,23 +438,23 @@ const FirstStep = ({ onNext }: { onNext: () => void }) => {
setRecommendedDropdownVisible(false);
}}
>
<Text style={RegisterStyle.dropdownItemText}>
<AppText style={RegisterStyle.dropdownItemText}>
{t(item.label)}
</Text>
</AppText>
</TouchableOpacity>
))}
</ScrollView>
</View>
)}
{errors.recommend && (
<Text style={RegisterStyle.errorText}>
<AppText style={RegisterStyle.errorText}>
{t(errors.recommend.message || '')}
</Text>
</AppText>
)}
{error && (
<Text style={[RegisterStyle.errorText]}>
<AppText style={[RegisterStyle.errorText]}>
{t(error)}
</Text>
</AppText>
)}
</View>
)}
@@ -491,10 +497,10 @@ const FirstStep = ({ onNext }: { onNext: () => void }) => {
)}
</Animated.View>
<View style={RegisterStyle.termsTextContainer}>
<Text style={RegisterStyle.termsText}>
<Text>{t('Foydalanish shartlari')}</Text>
<Text> {t('bilan tanishib chiqdim!')}</Text>
</Text>
<AppText style={RegisterStyle.termsText}>
<AppText>{t('Foydalanish shartlari')} </AppText>
<AppText> {t('bilan tanishib chiqdim!')} </AppText>
</AppText>
</View>
</TouchableOpacity>
</View>
@@ -511,7 +517,7 @@ const FirstStep = ({ onNext }: { onNext: () => void }) => {
{isPending ? (
<ActivityIndicator color="#fff" />
) : (
<Text
<AppText
style={[
RegisterStyle.btnText,
(!termsAccepted || isPending) &&
@@ -519,7 +525,7 @@ const FirstStep = ({ onNext }: { onNext: () => void }) => {
]}
>
{t('Davom etish')}
</Text>
</AppText>
)}
</TouchableOpacity>
</View>

View File

@@ -9,6 +9,7 @@ import {
import type { NativeStackNavigationProp } from '@react-navigation/native-stack';
import { useMutation } from '@tanstack/react-query';
import passportApi, { sendPassportPayload } from 'api/passport';
import AppText from 'components/AppText';
import DatePickerInput from 'components/DatePicker';
import SingleFileDrop from 'components/FileDrop';
import { useEffect, useRef, useState } from 'react';
@@ -23,7 +24,6 @@ import {
KeyboardAvoidingView,
Platform,
ScrollView,
Text,
TextInput,
TouchableOpacity,
View,
@@ -130,10 +130,10 @@ const SecondStep = () => {
style={RegisterStyle.background}
resizeMode="contain"
imageStyle={{
opacity: 0.3,
opacity: 0.1,
height: '100%',
width: '100%',
transform: [{ scale: 1.5 }],
transform: [{ scale: 1 }],
}}
>
<SafeAreaView style={{ flex: 1 }}>
@@ -151,9 +151,9 @@ const SecondStep = () => {
<ScrollView style={RegisterStyle.content}>
<View style={RegisterStyle.scrollContainer}>
<View style={RegisterStyle.loginContainer}>
<Text style={RegisterStyle.title}>
<AppText style={RegisterStyle.title}>
{t('Shaxsiy maʼlumotlar')}
</Text>
</AppText>
<Image
source={require('screens/../../assets/bootsplash/passport-sample.jpg')}
style={{ width: '100%', height: 300, borderRadius: 8 }}
@@ -161,9 +161,9 @@ const SecondStep = () => {
/>
<View>
{/* PASSPORT */}
<Text style={RegisterStyle.label}>
<AppText style={RegisterStyle.label}>
{t('Passport seriya raqami')}
</Text>
</AppText>
<View style={{ flexDirection: 'row' }}>
<Controller
control={control}
@@ -211,10 +211,10 @@ const SecondStep = () => {
/>
</View>
{(errors.passportSeriya || errors.passportNumber) && (
<Text style={RegisterStyle.errorText}>
<AppText style={RegisterStyle.errorText}>
{t(errors.passportSeriya?.message || '') ||
t(errors.passportNumber?.message || '')}
</Text>
</AppText>
)}
</View>
{/* JSHSHIR */}
@@ -223,7 +223,9 @@ const SecondStep = () => {
name="jshshir"
render={({ field: { onChange, value } }) => (
<View>
<Text style={RegisterStyle.label}>{t('JSHSHIR')}</Text>
<AppText style={RegisterStyle.label}>
{t('JSHSHIR')}{' '}
</AppText>
<TextInput
style={RegisterStyle.input}
placeholder="12345678901234"
@@ -236,9 +238,9 @@ const SecondStep = () => {
}
/>
{errors.jshshir && (
<Text style={RegisterStyle.errorText}>
<AppText style={RegisterStyle.errorText}>
{t(errors.jshshir.message || '')}
</Text>
</AppText>
)}
</View>
)}
@@ -250,9 +252,9 @@ const SecondStep = () => {
name="birthDate"
render={({ field: { onChange, value } }) => (
<View style={{ marginBottom: 10 }}>
<Text style={RegisterStyle.label}>
<AppText style={RegisterStyle.label}>
{t("Tug'ilgan sana")}
</Text>
</AppText>
<View
style={[
@@ -334,9 +336,9 @@ const SecondStep = () => {
</View>
{errors.birthDate && (
<Text style={RegisterStyle.errorText}>
<AppText style={RegisterStyle.errorText}>
{t(errors.birthDate?.message || '')}
</Text>
</AppText>
)}
</View>
)}
@@ -358,9 +360,9 @@ const SecondStep = () => {
/>
{/* FILE UPLOAD */}
<Text style={RegisterStyle.mainTitle}>
<AppText style={RegisterStyle.mainTitle}>
{t('Passport/ID karta rasmi yoki faylni yuklang')}
</Text>
</AppText>
<View
style={[
RegisterStyle.sectionsContainer,
@@ -403,14 +405,14 @@ const SecondStep = () => {
{isPending ? (
<ActivityIndicator color="#fff" />
) : (
<Text
<AppText
style={[
RegisterStyle.btnText,
!termsAccepted && RegisterStyle.buttonTextDisabled,
]}
>
{t('Tasdiqlash')}
</Text>
</AppText>
)}
</TouchableOpacity>
</View>

View File

@@ -1,14 +1,9 @@
import { useNavigation } from '@react-navigation/native';
import { NativeStackNavigationProp } from '@react-navigation/native-stack';
import AppText from 'components/AppText';
import React from 'react';
import { useTranslation } from 'react-i18next';
import {
ScrollView,
StyleSheet,
Text,
TouchableOpacity,
View,
} from 'react-native';
import { ScrollView, StyleSheet, TouchableOpacity, View } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import ArrowLeft from 'svg/ArrowLeft';
import { RootStackParamList } from 'types/types';
@@ -32,47 +27,53 @@ const TermsAndConditions = () => {
<TouchableOpacity onPress={() => navigation.goBack()}>
<ArrowLeft color="#000" />
</TouchableOpacity>
<Text style={styles.headerTitle}>{t('Foydalanish shartlari')}</Text>
<AppText style={styles.headerTitle}>
{t('Foydalanish shartlari')}
</AppText>
<View style={{ width: 20 }} />
</View>
<ScrollView style={styles.content} showsVerticalScrollIndicator={false}>
<Text style={styles.title}>
<AppText style={styles.title}>
{t('foydalanish_shartlari_va_qoidalari')}
</Text>
</AppText>
<Text style={styles.sectionTitle}>{t('umumiy_qoidalar')}</Text>
<Text style={styles.text}>{t('umumiy_qoidalar_text')}</Text>
<AppText style={styles.sectionTitle}>{t('umumiy_qoidalar')}</AppText>
<AppText style={styles.text}>{t('umumiy_qoidalar_text')}</AppText>
<Text style={styles.sectionTitle}>
<AppText style={styles.sectionTitle}>
{t('foydalanuvchi_majburiyatlari')}
</Text>
<Text style={styles.text}>
</AppText>
<AppText style={styles.text}>
{t('foydalanuvchi_majburiyatlari_text')}
</Text>
</AppText>
<Text style={styles.sectionTitle}>{t('maxfiylik_siyosati')}</Text>
<Text style={styles.text}>{t('maxfiylik_siyosati_text')}</Text>
<AppText style={styles.sectionTitle}>{t('maxfiylik_siyosati')}</AppText>
<AppText style={styles.text}>{t('maxfiylik_siyosati_text')}</AppText>
<Text style={styles.sectionTitle}>{t('javobgarlik')}</Text>
<Text style={styles.text}>{t('javobgarlik_text')}</Text>
<AppText style={styles.sectionTitle}>{t('javobgarlik')}</AppText>
<AppText style={styles.text}>{t('javobgarlik_text')}</AppText>
<Text style={styles.sectionTitle}>{t('shartlarni_ozgartirish')}</Text>
<Text style={styles.text}>{t('shartlarni_ozgartirish_text')}</Text>
<AppText style={styles.sectionTitle}>
{t('shartlarni_ozgartirish')}
</AppText>
<AppText style={styles.text}>
{t('shartlarni_ozgartirish_text')}
</AppText>
<Text style={styles.sectionTitle}>{t('aloqa')}</Text>
<Text style={styles.text}>{t('aloqa_text')}</Text>
<AppText style={styles.sectionTitle}>{t('aloqa')}</AppText>
<AppText style={styles.text}>{t('aloqa_text')}</AppText>
<View style={styles.footer}>
<Text style={styles.footerText}>
<AppText style={styles.footerText}>
{t('oxirgi_yangilanish')} {new Date().toLocaleDateString('uz-UZ')}
</Text>
</AppText>
</View>
</ScrollView>
<View style={styles.bottomContainer}>
<TouchableOpacity style={styles.agreeButton} onPress={handleAgree}>
<Text style={styles.agreeButtonText}>{t('roziman')}</Text>
<AppText style={styles.agreeButtonText}>{t('roziman')}</AppText>
</TouchableOpacity>
</View>
</SafeAreaView>
@@ -95,7 +96,7 @@ const styles = StyleSheet.create({
},
headerTitle: {
fontSize: 18,
fontWeight: '600',
fontFamily: 'GolosText-Bold',
color: '#000',
},
content: {
@@ -111,7 +112,7 @@ const styles = StyleSheet.create({
},
sectionTitle: {
fontSize: 18,
fontWeight: '600',
fontFamily: 'GolosText-Bold',
color: '#000',
marginTop: 20,
marginBottom: 10,
@@ -148,7 +149,7 @@ const styles = StyleSheet.create({
agreeButtonText: {
color: '#fff',
fontSize: 16,
fontWeight: '600',
fontFamily: 'GolosText-Bold',
},
});

View File

@@ -39,20 +39,20 @@ export const RegisterStyle = StyleSheet.create({
mainTitle: {
fontSize: 16,
fontWeight: '500',
color: '#28A7E8',
color: '#252525ff',
marginBottom: 10,
},
label: {
fontSize: 12,
fontSize: 14,
fontWeight: '500',
color: '#28A7E8',
color: '#252525ff',
marginBottom: 5,
},
title: {
fontSize: 24,
fontWeight: '600',
fontFamily: 'GolosText-Bold',
textAlign: 'center',
color: '#28A7E8',
color: '#000',
marginBottom: 20,
},
errorText: {
@@ -168,7 +168,7 @@ export const RegisterStyle = StyleSheet.create({
},
termsLink: {
color: '#28A7E8',
fontWeight: '600',
fontFamily: 'GolosText-Bold',
textDecorationLine: 'underline',
fontSize: 15,
},

View File

@@ -1,17 +1,18 @@
import { useNavigation } from '@react-navigation/native';
import { NativeStackNavigationProp } from '@react-navigation/native-stack';
import AppText from 'components/AppText';
import { useTranslation } from 'react-i18next';
import {
Image,
ScrollView,
StyleSheet,
Text,
TouchableOpacity,
View,
useWindowDimensions,
} from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import Logo from 'screens/../../assets/bootsplash/logo_512.png';
import InfoIcon from 'svg/Info';
import { RootStackParamList } from 'types/types';
type LoginScreenNavigationProp = NativeStackNavigationProp<
@@ -44,36 +45,66 @@ const SelectAuth = () => {
},
]}
/>
<Text style={[styles.logoText, { fontSize: 24 }]}>CPOST</Text>
{/* <AppText style={[styles.logoText, { fontSize: 32 }]}>CPOST</AppText> */}
</View>
<Text style={[styles.title, { fontSize: 24 }]}>
<AppText style={[styles.title, { fontSize: 24 }]}>
{t('Royxatdan otganmisz')}
</Text>
</AppText>
<View style={styles.btnContainer}>
<View style={{ gap: 4 }}>
<Text style={styles.helperText}>
{t("Botdan ro'yxatdan otganmisiz")}
</Text>
<View style={{ gap: 6 }}>
<TouchableOpacity
onPress={() => navigation.navigate('Login')}
style={styles.button}
style={[
styles.button,
{
backgroundColor: 'none',
borderWidth: 1,
borderColor: '#28A7E8',
},
]}
>
<Text style={styles.btnText}>{t('Tizimga kirish')}</Text>
<AppText style={[styles.btnText, { color: '#28A7E8' }]}>
{t('Tizimga kirish')}
</AppText>
</TouchableOpacity>
<View
style={{
gap: 4,
flexDirection: 'row',
justifyContent: 'center',
alignItems: 'center',
}}
>
<InfoIcon color="#000" height={18} width={18} />
<AppText style={styles.helperText}>
{t("Botdan ro'yxatdan otganmisiz")}?
</AppText>
</View>
<View style={{ gap: 4 }}>
<Text style={styles.helperText}>
{t("Yangi royxatdan o'tmoqchimisiz")}
</Text>
</View>
<View style={{ gap: 6 }}>
<TouchableOpacity
onPress={() => navigation.navigate('Register')}
style={styles.button}
>
<Text style={styles.btnText}>{t('Royxatdan otish')}</Text>
<AppText style={styles.btnText}>
{t('Royxatdan otish')}
</AppText>
</TouchableOpacity>
<View
style={{
gap: 4,
flexDirection: 'row',
justifyContent: 'center',
alignItems: 'center',
}}
>
<InfoIcon color="#000" height={18} width={18} />
<AppText style={styles.helperText}>
{t("Yangi royxatdan o'tmoqchimisiz")}?
</AppText>
</View>
</View>
</View>
</View>
@@ -110,18 +141,17 @@ const styles = StyleSheet.create({
},
logoText: {
fontWeight: '500',
marginTop: 4,
color: '#28A7E8',
},
title: {
fontWeight: '500',
fontFamily: 'GolosText-Bold',
textAlign: 'center',
color: '#28A7E8',
color: '#000',
marginBottom: 20,
},
helperText: {
color: '#28A7E8',
fontSize: 16,
color: '#252525ff',
fontSize: 12,
},
button: {
backgroundColor: '#28A7E8',

View File

@@ -1,6 +1,7 @@
import AppText from 'components/AppText';
import React, { useState } from 'react';
import { useTranslation } from 'react-i18next';
import { Image, StyleSheet, Text, TouchableOpacity, View } from 'react-native';
import { Image, StyleSheet, TouchableOpacity, View } from 'react-native';
import RU from 'screens/../../assets/bootsplash/RU.png';
import UZ from 'screens/../../assets/bootsplash/UZ.png';
import ArrowDown from 'svg/ArrowDown';
@@ -42,7 +43,7 @@ const LanguageSelector = () => {
source={selectedLang?.Icon}
style={{ width: 20, height: 20, objectFit: 'contain' }}
/>
<Text style={styles.selectedText}>{selectedLang?.label}</Text>
<AppText style={styles.selectedText}>{selectedLang?.label}</AppText>
</View>
{dropdownVisible ? (
<ArrowUp color={'#555'} width={20} height={20} />
@@ -63,7 +64,7 @@ const LanguageSelector = () => {
source={item.Icon}
style={{ width: 25, height: 25, objectFit: 'contain' }}
/>
<Text style={styles.dropdownItemText}>{item.label}</Text>
<AppText style={styles.dropdownItemText}>{item.label}</AppText>
</TouchableOpacity>
))}
</View>

View File

@@ -1,11 +1,11 @@
import { useNavigation } from '@react-navigation/native';
import { NativeStackNavigationProp } from '@react-navigation/native-stack';
import AppText from 'components/AppText';
import React from 'react';
import {
Image,
ScrollView,
StyleSheet,
Text,
TouchableOpacity,
View,
} from 'react-native';
@@ -46,15 +46,17 @@ const SelectLangPage = () => {
},
]}
/>
<Text style={[styles.logoText, { fontSize: 24 }]}>CPOST</Text>
<AppText style={[styles.logoText, { fontSize: 24 }]}>
CPOST
</AppText>
</View>
<Text style={[styles.title, { fontSize: 24 }]}>
<AppText style={[styles.title, { fontSize: 24 }]}>
Tilni tanlang{' '}
<Text style={[styles.title, { fontSize: 18 }]}>
<AppText style={[styles.title, { fontSize: 18 }]}>
(Выберите язык)
</Text>
</Text>
</AppText>
</AppText>
<View style={styles.btnContainer}>
<TouchableOpacity
@@ -62,7 +64,7 @@ const SelectLangPage = () => {
style={styles.button}
>
<Image source={UZ} style={styles.flag} />
<Text style={styles.btnText}>O'zbek tili</Text>
<AppText style={styles.btnText}>O'zbek tili</AppText>
</TouchableOpacity>
<TouchableOpacity
@@ -70,7 +72,7 @@ const SelectLangPage = () => {
style={styles.button}
>
<Image source={RU} style={styles.flag} />
<Text style={styles.btnText}>Русский язык</Text>
<AppText style={styles.btnText}>Русский язык</AppText>
</TouchableOpacity>
</View>
</View>

View File

@@ -1,6 +1,7 @@
import AsyncStorage from '@react-native-async-storage/async-storage';
import AppText from 'components/AppText';
import React, { useEffect, useState } from 'react';
import { Alert, StyleSheet, Text, TouchableOpacity, View } from 'react-native';
import { Alert, StyleSheet, TouchableOpacity, View } from 'react-native';
import ReactNativeBiometrics from 'react-native-biometrics';
import GesturePassword from 'react-native-gesture-password';
@@ -79,7 +80,7 @@ const LockScreen = ({ onAuthenticated }: Props) => {
return (
<View style={styles.container}>
<Text style={styles.title}>Unlock</Text>
<AppText style={styles.title}>Unlock</AppText>
{lockType === 'pattern' ? (
<GesturePassword
@@ -93,9 +94,9 @@ const LockScreen = ({ onAuthenticated }: Props) => {
style={styles.button}
onPress={() => handleUnlockPasswordOrPin(password)}
>
<Text style={styles.buttonText}>
<AppText style={styles.buttonText}>
Unlock with {lockType.toUpperCase()}
</Text>
</AppText>
</TouchableOpacity>
</View>
)}
@@ -113,7 +114,7 @@ const LockScreen = ({ onAuthenticated }: Props) => {
} catch (e) {}
}}
>
<Text style={styles.buttonText}>Unlock with Biometrics</Text>
<AppText style={styles.buttonText}>Unlock with Biometrics</AppText>
</TouchableOpacity>
)}
</View>

View File

@@ -2,18 +2,13 @@ import { useNavigation } from '@react-navigation/native';
import { NativeStackNavigationProp } from '@react-navigation/native-stack';
import { useQuery } from '@tanstack/react-query';
import { branchApi } from 'api/branch';
import AppText from 'components/AppText';
import LayoutTwo from 'components/LayoutTwo';
import NavbarBack from 'components/NavbarBack';
import NoResult from 'components/NoResult';
import * as React from 'react';
import { useTranslation } from 'react-i18next';
import {
ScrollView,
StyleSheet,
Text,
TouchableOpacity,
View,
} from 'react-native';
import { ScrollView, StyleSheet, TouchableOpacity, View } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import ArrowRightUnderline from 'svg/ArrowRightUnderline';
@@ -67,8 +62,8 @@ const Branches = (props: BranchesProps) => {
alignItems: 'flex-start',
}}
>
<Text style={styles.title}>{e.name}</Text>
<Text style={styles.subtitle}>{e.address}</Text>
<AppText style={styles.title}>{e.name}</AppText>
<AppText style={styles.subtitle}>{e.address}</AppText>
</View>
<ArrowRightUnderline color="#28A7E8" />
</View>
@@ -107,7 +102,7 @@ const styles = StyleSheet.create({
title: {
fontSize: 16,
paddingHorizontal: 5,
fontWeight: '600',
fontFamily: 'GolosText-Bold',
color: '#000',
marginBottom: 6,
},

View File

@@ -2,12 +2,13 @@ import { RouteProp, useNavigation, useRoute } from '@react-navigation/native';
import { NativeStackNavigationProp } from '@react-navigation/native-stack';
import { useQuery } from '@tanstack/react-query';
import { Branch, branchApi } from 'api/branch';
import AppText from 'components/AppText';
import BottomModal from 'components/BottomModal';
import LayoutTwo from 'components/LayoutTwo';
import LoadingScreen from 'components/LoadingScreen';
import React, { useEffect, useRef, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { StyleSheet, Text, TouchableOpacity, View } from 'react-native';
import { StyleSheet, TouchableOpacity, View } from 'react-native';
import WebView from 'react-native-webview';
import Minus from 'svg/Minus';
import Plus from 'svg/Plus';
@@ -174,25 +175,27 @@ const ListBranches = () => {
style={styles.zoomButton}
onPress={() => handleZoom('in')}
>
<Text>
<AppText>
<Plus color="#DEDEDE" />
</Text>
</AppText>
</TouchableOpacity>
<View style={styles.divider} />
<TouchableOpacity
style={styles.zoomButton}
onPress={() => handleZoom('out')}
>
<Text>
<AppText>
<Minus color="#DEDEDE" />
</Text>
</AppText>
</TouchableOpacity>
</View>
<TouchableOpacity
style={styles.button}
onPress={() => navigation.navigate('Branches')}
>
<Text style={styles.buttonText}>{t('Manzilni tekshirish')}</Text>
<AppText style={styles.buttonText}>
{t('Manzilni tekshirish')}
</AppText>
</TouchableOpacity>
</View>
)}
@@ -242,7 +245,7 @@ const styles = StyleSheet.create({
},
buttonText: {
color: '#fff',
fontWeight: '600',
fontFamily: 'GolosText-Bold',
fontSize: 16,
textAlign: 'center',
},

View File

@@ -2,16 +2,11 @@ import { useNavigation } from '@react-navigation/native';
import { NativeStackNavigationProp } from '@react-navigation/native-stack';
import { useQuery } from '@tanstack/react-query';
import reference_api from 'api/reference';
import AppText from 'components/AppText';
import LayoutTwo from 'components/LayoutTwo';
import * as React from 'react';
import { useTranslation } from 'react-i18next';
import {
ScrollView,
StyleSheet,
Text,
TouchableOpacity,
View,
} from 'react-native';
import { ScrollView, StyleSheet, TouchableOpacity, View } from 'react-native';
import Tabs from '../../home/ui/Tabs';
interface CargoPricesProps {}
@@ -41,90 +36,92 @@ const CargoPrices = (props: CargoPricesProps) => {
data.map(ref => (
<View style={styles.cardWhite}>
<View style={styles.priceCard}>
<Text style={styles.titleBlack}>{ref.title}</Text>
<Text style={[styles.titleBlack, { fontSize: 16 }]}>
<AppText style={styles.titleBlack}>{ref.title}</AppText>
<AppText style={[styles.titleBlack, { fontSize: 16 }]}>
{ref.price}$/{ref.unitValue}
{ref.unit}
</Text>
</AppText>
</View>
<Text style={styles.desc}>{ref.shortDescription}</Text>
<AppText style={styles.desc}>
{ref.shortDescription}
</AppText>
</View>
))}
<View style={styles.cardWhite}>
<View style={styles.priceCard}>
<Text style={styles.titleBlack}>
<AppText style={styles.titleBlack}>
{t(
'Avia pochtada bir maxsulotdan seriyalab olish mumkin emas',
)}
</Text>
</AppText>
</View>
<Text style={styles.desc}>
<AppText style={styles.desc}>
{t(
'(Bu kargo narxini osishiga olib keladi. Seriyali buyularni avto kargo orqali olib kelish arzonga tushadi)',
)}
</Text>
</AppText>
</View>
<View style={[styles.cardWhite, { backgroundColor: '#DFF2FD' }]}>
<View style={styles.priceCard}>
<Text style={[styles.titleBlack, { color: '#28A7E8' }]}>
<AppText style={[styles.titleBlack, { color: '#28A7E8' }]}>
{t('Yetib kelish vaqti')}
</Text>
<Text
</AppText>
<AppText
style={[
styles.titleBlack,
{ fontSize: 16, color: '#28A7E8' },
]}
>
7-10 {t('kun')}
</Text>
</AppText>
</View>
<Text style={[styles.desc, { color: '#28A7E8B2' }]}>
<AppText style={[styles.desc, { color: '#28A7E8B2' }]}>
{t(
'Yuklarni yetib elish vaqti oxirgi qadoqlash kunidan boshlab xisoblanadi',
)}
</Text>
</AppText>
</View>
<View style={styles.cardWhite}>
<View style={styles.priceCard}>
<Text style={styles.titleBlack}>
<AppText style={styles.titleBlack}>
{t('Minimal miqdor talab qilinmaydi.')}
</Text>
</AppText>
</View>
<Text style={styles.desc}>
<AppText style={styles.desc}>
{t(
"ya'ni, qancha gramm mahsulot olsangiz, shuncha og'irligi (gramm) uchun to'lov qilasiz.",
)}
</Text>
</AppText>
</View>
<View style={[styles.card]}>
<Text style={[styles.titleBlack, { color: '#FF6363' }]}>
<AppText style={[styles.titleBlack, { color: '#FF6363' }]}>
{t('Muhim!')}
</Text>
</AppText>
</View>
<View style={[styles.cardWhite, { backgroundColor: '#DFF2FD' }]}>
<View style={styles.priceCard}>
<Text style={[styles.titleBlack, { color: '#28A7E8' }]}>
<AppText style={[styles.titleBlack, { color: '#28A7E8' }]}>
{t('Filiallargacha yetkazib berish - bepul.')}
</Text>
</AppText>
</View>
<Text style={[styles.desc, { color: '#000000' }]}>
<AppText style={[styles.desc, { color: '#000000' }]}>
{t('Batafsil')}: @CPcargo_admin
</Text>
</AppText>
</View>
<View style={[styles.card]}>
<Text style={[styles.titleBlack, { color: '#000000B2' }]}>
<AppText style={[styles.titleBlack, { color: '#000000B2' }]}>
{t(
"Agar siz yashayotgan hududda bizning filialimiz mavjud bo'lmasa, o'zingizga eng yaqin bo'lgan filialni tanlab, ro'yhatdan o'tishingiz mumkin.",
)}
</Text>
</AppText>
</View>
<TouchableOpacity
style={[styles.card]}
onPress={() => navigation.navigate('ListBranches')}
>
<Text style={[styles.titleBlack, { color: '#28A7E8' }]}>
<AppText style={[styles.titleBlack, { color: '#28A7E8' }]}>
{t("Filiallarimiz ro'yhati ilovada mavjud")}
</Text>
</AppText>
</TouchableOpacity>
</View>
)}
@@ -134,83 +131,85 @@ const CargoPrices = (props: CargoPricesProps) => {
data.map(ref => (
<View style={styles.cardWhite}>
<View style={styles.priceCard}>
<Text style={styles.titleBlack}>{ref.title}</Text>
<Text style={[styles.titleBlack, { fontSize: 16 }]}>
<AppText style={styles.titleBlack}>{ref.title}</AppText>
<AppText style={[styles.titleBlack, { fontSize: 16 }]}>
{ref.price}$/{ref.unitValue}
{ref.unit}
</Text>
</AppText>
</View>
<Text style={styles.desc}>{ref.shortDescription}</Text>
<AppText style={styles.desc}>
{ref.shortDescription}
</AppText>
</View>
))}
<View style={styles.cardWhite}>
<Text style={styles.desc}>
<AppText style={styles.desc}>
{t(
'Avto kargoda bir maxsulotdan seriyalab istalgan katta miqdorda olish mumkin. Doimiykop yuk oluvchi ijozlar uchun maxsus arzonlashtrilgan narxlarimiz bor',
)}
</Text>
</AppText>
</View>
<View style={[styles.cardWhite, { backgroundColor: '#DFF2FD' }]}>
<View style={styles.priceCard}>
<Text style={[styles.titleBlack, { color: '#28A7E8' }]}>
<AppText style={[styles.titleBlack, { color: '#28A7E8' }]}>
{t('Yetib kelish vaqti')}
</Text>
<Text
</AppText>
<AppText
style={[
styles.titleBlack,
{ fontSize: 16, color: '#28A7E8' },
]}
>
10-20 {t('kun')}
</Text>
</AppText>
</View>
<Text style={[styles.desc, { color: '#28A7E8B2' }]}>
<AppText style={[styles.desc, { color: '#28A7E8B2' }]}>
{t(
'Yuklarni yetib elish vaqti oxirgi qadoqlash kunidan boshlab xisoblanadi',
)}
</Text>
</AppText>
</View>
<View style={styles.cardWhite}>
<View style={styles.priceCard}>
<Text style={styles.titleBlack}>
<AppText style={styles.titleBlack}>
{t('Minimal miqdor talab qilinmaydi.')}
</Text>
</AppText>
</View>
<Text style={styles.desc}>
<AppText style={styles.desc}>
{t(
"ya'ni, qancha gramm mahsulot olsangiz, shuncha og'irligi (gramm) uchun to'lov qilasiz.",
)}
</Text>
</AppText>
</View>
<View style={[styles.card]}>
<Text style={[styles.titleBlack, { color: '#FF6363' }]}>
<AppText style={[styles.titleBlack, { color: '#FF6363' }]}>
{t('Muhim!')}
</Text>
</AppText>
</View>
<View style={[styles.cardWhite, { backgroundColor: '#DFF2FD' }]}>
<View style={styles.priceCard}>
<Text style={[styles.titleBlack, { color: '#28A7E8' }]}>
<AppText style={[styles.titleBlack, { color: '#28A7E8' }]}>
{t('Filiallargacha yetkazib berish - bepul.')}
</Text>
</AppText>
</View>
<Text style={[styles.desc, { color: '#000000' }]}>
<AppText style={[styles.desc, { color: '#000000' }]}>
{t('Batafsil')}: @CPcargo_admin
</Text>
</AppText>
</View>
<View style={[styles.card]}>
<Text style={[styles.titleBlack, { color: '#000000B2' }]}>
<AppText style={[styles.titleBlack, { color: '#000000B2' }]}>
{t(
"Agar siz yashayotgan hududda bizning filialimiz mavjud bo'lmasa, o'zingizga eng yaqin bo'lgan filialni tanlab, ro'yhatdan o'tishingiz mumkin.",
)}
</Text>
</AppText>
</View>
<TouchableOpacity
style={[styles.card]}
onPress={() => navigation.navigate('ListBranches')}
>
<Text style={[styles.titleBlack, { color: '#28A7E8' }]}>
<AppText style={[styles.titleBlack, { color: '#28A7E8' }]}>
{t("Filiallarimiz ro'yhati ilovada mavjud")}
</Text>
</AppText>
</TouchableOpacity>
</View>
)}

View File

@@ -1,8 +1,9 @@
import { useNavigation } from '@react-navigation/native';
import { NativeStackNavigationProp } from '@react-navigation/native-stack';
import AppText from 'components/AppText';
import React from 'react';
import { useTranslation } from 'react-i18next';
import { StyleSheet, Text, TouchableOpacity, View } from 'react-native';
import { StyleSheet, TouchableOpacity, View } from 'react-native';
import ArrowRightUnderline from 'svg/ArrowRightUnderline';
import Usd from 'svg/Dollar';
import InfoIcon from 'svg/Info';
@@ -21,7 +22,7 @@ const Pages = () => {
>
<View style={styles.text}>
<Usd color="#28A7E8" width={28} height={28} colorCircle="#28A7E8" />
<Text style={styles.title}>{t('Kargo narxlari')}</Text>
<AppText style={styles.title}>{t('Kargo narxlari')}</AppText>
</View>
<ArrowRightUnderline color="#000000" width={24} height={24} />
</TouchableOpacity>
@@ -32,7 +33,7 @@ const Pages = () => {
>
<View style={styles.text}>
<InfoIcon color="#28A7E8" width={28} height={28} />
<Text style={styles.title}>{t('Taqiqlangan buyumlar')}</Text>
<AppText style={styles.title}>{t('Taqiqlangan buyumlar')}</AppText>
</View>
<ArrowRightUnderline color="#000000" width={24} height={24} />
</TouchableOpacity>
@@ -45,7 +46,7 @@ const Pages = () => {
height={28 * scale}
view="-4"
/>
<Text style={styles.title}>Shaxar boylab yetkazish</Text>
<AppText style={styles.title}>Shaxar boylab yetkazish</AppText>
</View>
<ArrowRightUnderline
color="#000000"
@@ -60,7 +61,7 @@ const Pages = () => {
>
<View style={styles.text}>
<Store color="#28A7E8" width={28} height={28} />
<Text style={styles.title}>{t('Filiallar royxati')}</Text>
<AppText style={styles.title}>{t('Filiallar royxati')}</AppText>
</View>
<ArrowRightUnderline color="#000000" width={24} height={24} />
</TouchableOpacity>
@@ -71,7 +72,7 @@ const Pages = () => {
>
<View style={styles.text}>
<BarCode color="#28A7E8" width={28 * scale} height={28 * scale} />
<Text style={styles.title}>{t('Kodsiz tovarlar')}</Text>
<AppText style={styles.title}>{t('Kodsiz tovarlar')}</AppText>
</View>
<ArrowRightUnderline
color="#000000"
@@ -116,7 +117,7 @@ const makeStyles = () =>
},
title: {
fontSize: 16,
fontWeight: '600',
fontFamily: 'GolosText-Bold',
},
});

View File

@@ -1,4 +1,5 @@
import AnimatedIcon from 'components/AnimatedIcon';
import AppText from 'components/AppText';
import React, { useMemo, useRef, useState } from 'react';
import { useTranslation } from 'react-i18next';
import {
@@ -6,7 +7,6 @@ import {
Modal,
Pressable,
StyleSheet,
Text,
useWindowDimensions,
View,
} from 'react-native';
@@ -152,12 +152,12 @@ const PartyCarousel = ({
},
]}
>
<Text style={[styles.dateLabel, { color: textColor }]}>
<AppText style={[styles.dateLabel, { color: textColor }]}>
{day.date.slice(-2)}
</Text>
<Text style={[styles.dateLabel, { color: textColor }]}>
</AppText>
<AppText style={[styles.dateLabel, { color: textColor }]}>
{t(day.weekday)}
</Text>
</AppText>
</View>
);
}}
@@ -167,7 +167,9 @@ const PartyCarousel = ({
<View style={styles.divider} />
<View style={styles.rowFull}>
<Text style={styles.reysTitle}>{item.cargo.toUpperCase()}</Text>
<AppText style={styles.reysTitle}>
{item.cargo.toUpperCase()}
</AppText>
<View style={styles.animatedIconWrapper}>
<AnimatedIcon type={item.cargo} />
</View>
@@ -208,20 +210,25 @@ const PartyCarousel = ({
>
<View style={modalStyles.modalOverlay}>
<View style={modalStyles.modalContent}>
<Text style={modalStyles.modalTitle}>
<AppText style={modalStyles.modalTitle}>
{t('Yetkazish tafsilotlari')}
</Text>
</AppText>
{selectedItem &&
selectedItem.start.map((day: any, idx: number) => (
<Text key={idx} style={{ textAlign: 'left', width: '100%' }}>
<AppText
key={idx}
style={{ textAlign: 'left', width: '100%', marginTop: 2 }}
>
{day.date} - {t(day.weekday)} - {t(day.status)}
</Text>
</AppText>
))}
<Pressable
onPress={() => setModalVisible(false)}
style={modalStyles.closeButton}
>
<Text style={{ color: '#fff' }}>{t('Yopish')}</Text>
<AppText style={{ color: '#fff', textAlign: 'center' }}>
{t('Yopish')}
</AppText>
</Pressable>
</View>
</View>
@@ -248,13 +255,15 @@ const modalStyles = StyleSheet.create({
},
modalTitle: {
fontSize: 18,
fontWeight: '600',
fontFamily: 'GolosText-Bold',
marginBottom: 12,
},
closeButton: {
marginTop: 20,
backgroundColor: '#28A7E8',
paddingVertical: 8,
width: '100%',
textAlign: 'center',
paddingHorizontal: 20,
borderRadius: 8,
},

View File

@@ -1,6 +1,7 @@
import AppText from 'components/AppText';
import { Dispatch, SetStateAction, useMemo } from 'react';
import { useTranslation } from 'react-i18next';
import { Image, Text, TouchableOpacity, View } from 'react-native';
import { Image, TouchableOpacity, View } from 'react-native';
import LinearGradient from 'react-native-linear-gradient';
import AviaLogo from 'screens/../../assets/bootsplash/Avia.png';
import AutoLogo from 'screens/../../assets/bootsplash/auto.png';
@@ -63,11 +64,11 @@ const Tabs = ({ activeTab, setActiveTab }: Props) => {
style={gradientStyle}
>
<Image source={item.logo} style={styles.tabsLogo} />
<Text
<AppText
style={[styles.tabsText, { color: isActive ? '#fff' : '#000' }]}
>
{item.label}
</Text>
</AppText>
</LinearGradient>
</TouchableOpacity>
);

View File

@@ -2,12 +2,12 @@ import Clipboard from '@react-native-clipboard/clipboard';
import { useQuery } from '@tanstack/react-query';
import { authApi } from 'api/auth';
import warhouses_api from 'api/warhouses';
import AppText from 'components/AppText';
import React from 'react';
import { useTranslation } from 'react-i18next';
import {
FlatList,
StyleSheet,
Text,
TouchableOpacity,
useWindowDimensions,
View,
@@ -86,11 +86,11 @@ const TabsAuto = () => {
<View style={[styles.card, { marginRight: isLast ? 0 : 10 }]}>
<View style={styles.titleCard}>
<Kitay width={24 * scale} height={24 * scale} />
<Text style={styles.title}>China (Auto)</Text>
<AppText style={styles.title}>China (Auto)</AppText>
</View>
<View style={styles.infoId}>
<View style={{ gap: 4 * scale, width: '90%' }}>
<Text style={styles.infoText}>{item}</Text>
<AppText style={styles.infoText}>{item}</AppText>
</View>
<TouchableOpacity onPress={() => handleCopy([item])}>
<Copy color="#28A7E8" width={24 * scale} height={24 * scale} />
@@ -124,7 +124,7 @@ const makeStyles = (scale: number, cardWidth: number, screenWidth: number) =>
},
title: {
fontSize: 20 * scale,
fontWeight: '600',
fontFamily: 'GolosText-Bold',
color: '#101623CC',
},
infoId: {

View File

@@ -2,12 +2,12 @@ import Clipboard from '@react-native-clipboard/clipboard';
import { useQuery } from '@tanstack/react-query';
import { authApi } from 'api/auth';
import warhouses_api from 'api/warhouses';
import AppText from 'components/AppText';
import React from 'react';
import { useTranslation } from 'react-i18next';
import {
FlatList,
StyleSheet,
Text,
TouchableOpacity,
useWindowDimensions,
View,
@@ -87,11 +87,11 @@ const TabsAvia = () => {
<View style={[styles.card, { marginRight: isLast ? 0 : 10 }]}>
<View style={styles.titleCard}>
<Kitay width={24 * scale} height={24 * scale} />
<Text style={styles.title}>China (AVIA)</Text>
<AppText style={styles.title}>China (AVIA)</AppText>
</View>
<View style={styles.infoId}>
<View style={{ gap: 4 * scale, width: '90%' }}>
<Text style={styles.infoText}>{item}</Text>
<AppText style={styles.infoText}>{item}</AppText>
</View>
<TouchableOpacity onPress={() => handleCopy([item])}>
<Copy color="#28A7E8" width={24 * scale} height={24 * scale} />
@@ -139,7 +139,7 @@ const makeStyles = (scale: number, cardWidth: number, screenWidth: number) =>
},
title: {
fontSize: 20,
fontWeight: '600',
fontFamily: 'GolosText-Bold',
color: '#101623CC',
},
infoId: {

View File

@@ -46,7 +46,7 @@ export const HomeStyle = () =>
reysTitle: {
fontSize: 20,
color: '#28A7E8',
fontWeight: '600',
fontFamily: 'GolosText-Bold',
},
text: {
fontWeight: '500',
@@ -171,6 +171,6 @@ export const HomeStyle = () =>
width: '60%',
color: '#FFFFFF',
fontSize: 14,
fontWeight: '600',
fontFamily: 'GolosText-Bold',
},
});

View File

@@ -1,7 +1,8 @@
import AppText from 'components/AppText';
import LayoutTwo from 'components/LayoutTwo';
import * as React from 'react';
import { useTranslation } from 'react-i18next';
import { ScrollView, StyleSheet, Text, View } from 'react-native';
import { ScrollView, StyleSheet, View } from 'react-native';
import Battery from 'svg/Battery';
import Blade from 'svg/Blade';
import Book from 'svg/Book';
@@ -17,16 +18,16 @@ import Tabs from '../../home/ui/Tabs';
interface RestrictedProductProps {}
const RestrictedProduct = (props: RestrictedProductProps) => {
const [activeTab, setActiveTab] = React.useState<'avia' | 'auto'>('avia');
const [activeTab, setActiveTab] = React.useState<'AVIA' | 'AUTO'>('AVIA');
const { t } = useTranslation();
return (
<LayoutTwo title={t('Taqiqlangan buyumlar')}>
<ScrollView style={{ flex: 1 }}>
<View style={styles.container}>
<Tabs activeTab={activeTab} setActiveTab={setActiveTab} />
{activeTab === 'avia' && (
{activeTab === 'AVIA' && (
<View style={{ marginTop: 10, gap: 10, marginBottom: 20 }}>
<Text
<AppText
style={{
width: '95%',
margin: 'auto',
@@ -35,236 +36,238 @@ const RestrictedProduct = (props: RestrictedProductProps) => {
}}
>
{t('Aviada taqiqlangan buyumlar')}
</Text>
</AppText>
<View style={styles.cardWhite}>
<View style={styles.priceCard}>
<Text style={styles.titleBlack}>
<AppText style={styles.titleBlack}>
<WaterGlass />
</Text>
<Text style={[styles.titleBlack, { fontSize: 16 }]}>
</AppText>
<AppText style={[styles.titleBlack, { fontSize: 16 }]}>
{t('Ichida suyuqligi bor narsalar')}
</Text>
</AppText>
</View>
</View>
<View style={styles.cardWhite}>
<View style={styles.priceCard}>
<Text style={styles.titleBlack}>
<AppText style={styles.titleBlack}>
<Battery />
</Text>
</AppText>
<View style={{ width: '90%' }}>
<Text style={[styles.titleBlack, { fontSize: 16 }]}>
<AppText style={[styles.titleBlack, { fontSize: 16 }]}>
{t('Batareykasi va magnit bolgan istalgan narsa')}
</Text>
<Text style={styles.desc}>
</AppText>
<AppText style={styles.desc}>
{t(
'(Telifon, sensitive buyumlar, airpods, naushnik, qol soati, tagi yonadigan krasovkalar...)',
)}
</Text>
</AppText>
</View>
</View>
</View>
<View style={styles.cardWhite}>
<View style={styles.priceCard}>
<Text style={styles.titleBlack}>
<AppText style={styles.titleBlack}>
<Pencil />
</Text>
</AppText>
<View style={{ width: '90%' }}>
<Text style={[styles.titleBlack, { fontSize: 16 }]}>
<AppText style={[styles.titleBlack, { fontSize: 16 }]}>
{t('Kukunli buyumlar')}
</Text>
<Text style={styles.desc}>{t('(Pudra, ten...)')}</Text>
</AppText>
<AppText style={styles.desc}>
{t('(Pudra, ten...)')}
</AppText>
</View>
</View>
</View>
<View style={styles.cardWhite}>
<View style={styles.priceCard}>
<Text style={styles.titleBlack}>
<AppText style={styles.titleBlack}>
<Glass />
</Text>
</AppText>
<View style={{ width: '90%' }}>
<Text style={[styles.titleBlack, { fontSize: 16 }]}>
<AppText style={[styles.titleBlack, { fontSize: 16 }]}>
{t('Parfumeriya')}
</Text>
<Text style={styles.desc}>
</AppText>
<AppText style={styles.desc}>
{t(
'(Barcha Parfumeriya va kosmetika, yuvinish maxsulotlari)',
)}
</Text>
</AppText>
</View>
</View>
</View>
<View style={styles.cardWhite}>
<View style={styles.priceCard}>
<Text style={styles.titleBlack}>
<AppText style={styles.titleBlack}>
<Blade />
</Text>
</AppText>
<View style={{ width: '90%' }}>
<Text style={[styles.titleBlack, { fontSize: 16 }]}>
<AppText style={[styles.titleBlack, { fontSize: 16 }]}>
{t('Otkir tigli va sovuq qirollar')}
</Text>
<Text style={styles.desc}>
</AppText>
<AppText style={styles.desc}>
{t('(Pichoq, qaychi, miltiq...)')}
</Text>
</AppText>
</View>
</View>
</View>
<View style={styles.cardWhite}>
<View style={styles.priceCard}>
<Text style={styles.titleBlack}>
<AppText style={styles.titleBlack}>
<Jewelry />
</Text>
</AppText>
<View style={{ width: '90%' }}>
<Text style={[styles.titleBlack, { fontSize: 16 }]}>
<AppText style={[styles.titleBlack, { fontSize: 16 }]}>
{t('Zargarklik buyumlari')}
</Text>
<Text style={styles.desc}>
</AppText>
<AppText style={styles.desc}>
{t('(Tilla, kumush, olmos, braslit...)')}
</Text>
</AppText>
</View>
</View>
</View>
<View style={styles.cardWhite}>
<View style={styles.priceCard}>
<Text style={styles.titleBlack}>
<AppText style={styles.titleBlack}>
<Drug />
</Text>
</AppText>
<View style={{ width: '90%' }}>
<Text style={[styles.titleBlack, { fontSize: 16 }]}>
<AppText style={[styles.titleBlack, { fontSize: 16 }]}>
{t('Dori darmon va med texnika')}
</Text>
</AppText>
</View>
</View>
</View>
<View style={styles.cardWhite}>
<View style={styles.priceCard}>
<Text style={styles.titleBlack}>
<AppText style={styles.titleBlack}>
<Food />
</Text>
</AppText>
<View style={{ width: '90%' }}>
<Text style={[styles.titleBlack, { fontSize: 16 }]}>
<AppText style={[styles.titleBlack, { fontSize: 16 }]}>
{t('Oziq ovqat')}
</Text>
</AppText>
</View>
</View>
</View>
<View style={[styles.card]}>
<Text style={[styles.titleBlack, { color: '#000000B2' }]}>
<AppText style={[styles.titleBlack, { color: '#000000B2' }]}>
{t(
"Agar sizda g'ayrioddiy yoki noaniq mahsulot bo'lsa, albatta buyurtma qilishdan oldin so'rashingiz tavsiya etiladi.",
)}
</Text>
</AppText>
</View>
<View style={[styles.card]}>
<Text style={[styles.titleBlack, { color: '#FF6363' }]}>
<AppText style={[styles.titleBlack, { color: '#FF6363' }]}>
{t('Muhim!')}
</Text>
</AppText>
</View>
<View style={[styles.card]}>
<Text style={[styles.titleBlack, { color: '#000000B2' }]}>
<AppText style={[styles.titleBlack, { color: '#000000B2' }]}>
{t(
"Avia pochta manzili orqali yuborilishi taqiqlangan mahsulot buyurtma qilgan bo'lsangiz, u avtomatik ravishda avtokargo yukiga (avto) o'tkaziladi. Shunday qilib, yukingiz Xitoy omborida qolib ketmaydi.",
)}
</Text>
</AppText>
</View>
<View style={[styles.cardWhite, { backgroundColor: '#DFF2FD' }]}>
<Text style={[styles.desc, { color: '#28A7E8B2' }]}>
<AppText style={[styles.desc, { color: '#28A7E8B2' }]}>
{t(
`Shu bilan birga, Aviada ham, Avtoda ham taqiqlangan mahsulot yuborilgan bo'lsa bunday holatda mahsulot O'zbekistonga yuborilmaydi va bu uchun javobgarlik mijozga yuklanadi.`,
)}
</Text>
</AppText>
</View>
</View>
)}
{activeTab === 'auto' && (
{activeTab === 'AUTO' && (
<View style={{ marginTop: 10, gap: 10, marginBottom: 20 }}>
<View style={styles.cardWhite}>
<View style={styles.priceCard}>
<Text style={styles.titleBlack}>
<AppText style={styles.titleBlack}>
<Jewelry />
</Text>
</AppText>
<View style={{ width: '90%' }}>
<Text style={[styles.titleBlack, { fontSize: 16 }]}>
<AppText style={[styles.titleBlack, { fontSize: 16 }]}>
{t('Zargarklik buyumlari')}
</Text>
<Text style={styles.desc}>
</AppText>
<AppText style={styles.desc}>
{t('(Tilla, kumush, olmos, braslit...)')}
</Text>
</AppText>
</View>
</View>
</View>
<View style={styles.cardWhite}>
<View style={styles.priceCard}>
<Text style={styles.titleBlack}>
<AppText style={styles.titleBlack}>
<Drug />
</Text>
</AppText>
<View style={{ width: '90%' }}>
<Text style={[styles.titleBlack, { fontSize: 16 }]}>
<AppText style={[styles.titleBlack, { fontSize: 16 }]}>
{t('Dori darmon va med texnika')}
</Text>
</AppText>
</View>
</View>
</View>
<View style={styles.cardWhite}>
<View style={styles.priceCard}>
<Text style={styles.titleBlack}>
<AppText style={styles.titleBlack}>
<Food />
</Text>
</AppText>
<View style={{ width: '90%' }}>
<Text style={[styles.titleBlack, { fontSize: 16 }]}>
<AppText style={[styles.titleBlack, { fontSize: 16 }]}>
{t('Oziq ovqat')}
</Text>
</AppText>
</View>
</View>
</View>
<View style={styles.cardWhite}>
<View style={styles.priceCard}>
<Text style={styles.titleBlack}>
<AppText style={styles.titleBlack}>
<Book />
</Text>
</AppText>
<View style={{ width: '90%' }}>
<Text style={[styles.titleBlack, { fontSize: 16 }]}>
<AppText style={[styles.titleBlack, { fontSize: 16 }]}>
{t('Diniy kitob va diniy buyumlar')}
</Text>
</AppText>
</View>
</View>
</View>
<View style={styles.cardWhite}>
<View style={styles.priceCard}>
<Text style={styles.titleBlack}>
<AppText style={styles.titleBlack}>
<Dron />
</Text>
</AppText>
<View style={{ width: '90%' }}>
<Text style={[styles.titleBlack, { fontSize: 16 }]}>
<AppText style={[styles.titleBlack, { fontSize: 16 }]}>
{t('Dron, avtomat qurollar')}
</Text>
</AppText>
</View>
</View>
</View>
<View style={[styles.card]}>
<Text style={[styles.titleBlack, { color: '#000000B2' }]}>
<AppText style={[styles.titleBlack, { color: '#000000B2' }]}>
{t(
"Agar sizda g'ayrioddiy yoki noaniq mahsulot bo'lsa, albatta buyurtma qilishdan oldin so'rashingiz tavsiya etiladi.",
)}
</Text>
</AppText>
</View>
<View style={[styles.card]}>
<Text style={[styles.titleBlack, { color: '#FF6363' }]}>
<AppText style={[styles.titleBlack, { color: '#FF6363' }]}>
{t('Muhim!')}
</Text>
</AppText>
</View>
<View style={[styles.card]}>
<Text style={[styles.titleBlack, { color: '#000000B2' }]}>
<AppText style={[styles.titleBlack, { color: '#000000B2' }]}>
{t(
"Avia pochta manzili orqali yuborilishi taqiqlangan mahsulot buyurtma qilgan bo'lsangiz, u avtomatik ravishda avtokargo yukiga (avto) o'tkaziladi. Shunday qilib, yukingiz Xitoy omborida qolib ketmaydi.",
)}
</Text>
</AppText>
</View>
<View style={[styles.cardWhite, { backgroundColor: '#DFF2FD' }]}>
<Text style={[styles.desc, { color: '#28A7E8B2' }]}>
<AppText style={[styles.desc, { color: '#28A7E8B2' }]}>
{t(
"Shu bilan birga, Aviada ham, Avtoda ham taqiqlangan mahsulot yuborilgan bo'lsa bunday holatda mahsulot O'zbekistonga yuborilmaydi va bu uchun javobgarlik mijozga yuklanadi.",
)}
</Text>
</AppText>
</View>
</View>
)}

View File

@@ -1,8 +1,9 @@
import AppText from 'components/AppText';
import Navbar from 'components/Navbar';
import Navigation from 'components/Navigation';
import React from 'react';
import { useTranslation } from 'react-i18next';
import { Image, ScrollView, StyleSheet, Text, View } from 'react-native';
import { Image, ScrollView, StyleSheet, View } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
const Uncodified = () => {
@@ -20,8 +21,8 @@ const Uncodified = () => {
style={styles.image}
/>
<View style={styles.textCard}>
<Text style={styles.title}>{t('Trek ID')}:</Text>
<Text style={styles.text}>YT12345678</Text>
<AppText style={styles.title}>{t('Trek ID')}:</AppText>
<AppText style={styles.text}>YT12345678</AppText>
</View>
</View>
</ScrollView>

View File

@@ -1,12 +1,12 @@
import { useNavigation } from '@react-navigation/native';
import { NativeStackNavigationProp } from '@react-navigation/native-stack';
import AppText from 'components/AppText';
import LottieView from 'lottie-react-native';
import React, { useEffect, useRef, useState } from 'react';
import { useTranslation } from 'react-i18next';
import {
Animated,
StyleSheet,
Text,
TouchableOpacity,
useWindowDimensions,
View,
@@ -83,11 +83,11 @@ const CreateModal = ({ visible, setVisible, error }: ModalSuccessViewProps) => {
]}
>
<View style={styles.header}>
<Text style={styles.title}>
<AppText style={styles.title}>
{error
? t("Passport qo'shishda xatolik yuz berdi")
: t("Passport muvaffaqqiyatli qo'shildi")}
</Text>
</AppText>
<TouchableOpacity
onPress={closeModal}
style={styles.closeBtn}
@@ -137,11 +137,11 @@ const CreateModal = ({ visible, setVisible, error }: ModalSuccessViewProps) => {
style={styles.btn}
onPress={() => setVisible(false)}
>
<Text style={styles.btnText}>{t('Yaxshi')}</Text>
<AppText style={styles.btnText}>{t('Yaxshi')}</AppText>
</TouchableOpacity>
) : (
<TouchableOpacity style={styles.btn} onPress={closeModal}>
<Text style={styles.btnText}>{t('Yaxshi')}</Text>
<AppText style={styles.btnText}>{t('Yaxshi')}</AppText>
</TouchableOpacity>
)}
</>

View File

@@ -1,6 +1,7 @@
import { zodResolver } from '@hookform/resolvers/zod';
import { useMutation } from '@tanstack/react-query';
import passportApi, { AddPassportPayload } from 'api/passport';
import AppText from 'components/AppText';
import DatePickerInput from 'components/DatePicker';
import SingleFileDrop from 'components/FileDrop';
import LayoutTwo from 'components/LayoutTwo';
@@ -13,7 +14,6 @@ import {
KeyboardAvoidingView,
Platform,
ScrollView,
Text,
TextInput,
TouchableOpacity,
View,
@@ -121,7 +121,7 @@ const CreatePassword = () => {
name="firstName"
render={({ field: { onChange, value } }) => (
<View>
<Text style={PassportStyle.label}>{t('Ism')}</Text>
<AppText style={PassportStyle.label}>{t('Ism')}</AppText>
<TextInput
style={PassportStyle.input}
placeholder={t('Ismingiz')}
@@ -130,9 +130,9 @@ const CreatePassword = () => {
placeholderTextColor={'#D8DADC'}
/>
{errors.firstName && (
<Text style={PassportStyle.errorText}>
<AppText style={PassportStyle.errorText}>
{t(errors.firstName.message || '')}
</Text>
</AppText>
)}
</View>
)}
@@ -142,7 +142,9 @@ const CreatePassword = () => {
name="lastName"
render={({ field: { onChange, value } }) => (
<View>
<Text style={PassportStyle.label}>{t('Familiya')}</Text>
<AppText style={PassportStyle.label}>
{t('Familiya')}
</AppText>
<TextInput
style={PassportStyle.input}
placeholder={t('Familiyangiz')}
@@ -151,17 +153,17 @@ const CreatePassword = () => {
value={value}
/>
{errors.lastName && (
<Text style={PassportStyle.errorText}>
<AppText style={PassportStyle.errorText}>
{t(errors.lastName.message || '')}
</Text>
</AppText>
)}
</View>
)}
/>
<View>
<Text style={PassportStyle.label}>
<AppText style={PassportStyle.label}>
{t('Passport seriya raqami')}
</Text>
</AppText>
<View style={{ flexDirection: 'row' }}>
<Controller
control={control}
@@ -204,14 +206,14 @@ const CreatePassword = () => {
/>
</View>
{(errors.passportSeriya || errors.passportNumber) && (
<Text style={PassportStyle.errorText}>
<AppText style={PassportStyle.errorText}>
{t(errors.passportSeriya?.message || '') ||
t(errors.passportNumber?.message || '')}
</Text>
</AppText>
)}
</View>
<View>
<Text style={PassportStyle.label}>{t('JSHSHIR')}</Text>
<AppText style={PassportStyle.label}>{t('JSHSHIR')}</AppText>
<Controller
control={control}
name="jshshir"
@@ -231,9 +233,9 @@ const CreatePassword = () => {
)}
/>
{errors.jshshir && (
<Text style={PassportStyle.errorText}>
<AppText style={PassportStyle.errorText}>
{t(errors.jshshir.message || '')}
</Text>
</AppText>
)}
</View>
<View>
@@ -242,9 +244,9 @@ const CreatePassword = () => {
name="birthDate"
render={({ field: { onChange, value } }) => (
<View style={{ marginBottom: 10 }}>
<Text style={PassportStyle.label}>
<AppText style={PassportStyle.label}>
{t("Tug'ilgan sana")}
</Text>
</AppText>
<View style={[PassportStyle.inputContainer]}>
<TextInput
@@ -315,9 +317,9 @@ const CreatePassword = () => {
</View>
{errors.birthDate && (
<Text style={PassportStyle.errorText}>
<AppText style={PassportStyle.errorText}>
{t(errors.birthDate?.message || '')}
</Text>
</AppText>
)}
</View>
)}
@@ -339,9 +341,9 @@ const CreatePassword = () => {
/>
</View>
<View>
<Text style={PassportStyle.mainTitle}>
<AppText style={PassportStyle.mainTitle}>
{t('Passport/ID karta rasmi yoki faylni yuklang')}
</Text>
</AppText>
<View
style={[
PassportStyle.sectionsContainer,
@@ -379,7 +381,9 @@ const CreatePassword = () => {
{isPending ? (
<ActivityIndicator color="#fff" />
) : (
<Text style={PassportStyle.btnText}>{t("Qo'shish")}</Text>
<AppText style={PassportStyle.btnText}>
{t("Qo'shish")}
</AppText>
)}
</TouchableOpacity>
</View>

View File

@@ -1,16 +1,11 @@
import Clipboard from '@react-native-clipboard/clipboard';
import { getMeData } from 'api/auth/type';
import { myPassport } from 'api/passport';
import AppText from 'components/AppText';
import formatDate from 'helpers/formatData';
import React from 'react';
import { useTranslation } from 'react-i18next';
import {
Dimensions,
StyleSheet,
Text,
TouchableOpacity,
View,
} from 'react-native';
import { Dimensions, StyleSheet, TouchableOpacity, View } from 'react-native';
import Toast from 'react-native-toast-message';
import Copy from 'svg/Copy';
@@ -64,7 +59,9 @@ const MyPassport = ({ getMe, myPassport }: Props) => {
alignItems: 'center',
}}
>
<Text style={styles.title}>{t('Passport malumotlarim')}</Text>
<AppText style={styles.title}>
{t('Passport malumotlarim')}{' '}
</AppText>
{getMe?.status && (
<View
style={[
@@ -72,14 +69,14 @@ const MyPassport = ({ getMe, myPassport }: Props) => {
{ backgroundColor: getStatusMeta(getMe.status).bg },
]}
>
<Text
<AppText
style={[
styles.statusText,
{ color: getStatusMeta(getMe.status).fg },
]}
>
{getStatusMeta(getMe.status).label}
</Text>
</AppText>
</View>
)}
</View>
@@ -93,7 +90,7 @@ const MyPassport = ({ getMe, myPassport }: Props) => {
]}
>
<View style={styles.infoHeader}>
<Text style={styles.infoTitle}>{t('Tez ID')}</Text>
<AppText style={styles.infoTitle}>{t('Tez ID')} </AppText>
<TouchableOpacity
onPress={() =>
handleCopy((getMe && getMe?.aviaCargoId) || '')
@@ -102,7 +99,7 @@ const MyPassport = ({ getMe, myPassport }: Props) => {
<Copy color="#28A7E8" width={20} height={20} />
</TouchableOpacity>
</View>
<Text style={styles.infoText}>{getMe?.aviaCargoId}</Text>
<AppText style={styles.infoText}>{getMe?.aviaCargoId} </AppText>
</View>
<View
@@ -113,8 +110,8 @@ const MyPassport = ({ getMe, myPassport }: Props) => {
: { flexBasis: '65%', alignItems: 'flex-end' },
]}
>
<Text style={styles.infoTitle}>{t('JSHSHIR')}</Text>
<Text style={styles.infoText}>{data.passportPin}</Text>
<AppText style={styles.infoTitle}>{t('JSHSHIR')} </AppText>
<AppText style={styles.infoText}>{data.passportPin} </AppText>
</View>
<View
@@ -123,8 +120,8 @@ const MyPassport = ({ getMe, myPassport }: Props) => {
{ flexBasis: '100%', alignItems: 'flex-start' },
]}
>
<Text style={styles.infoTitle}>{t('Toliq ismi')}</Text>
<Text style={styles.infoText}>{data.fullName}</Text>
<AppText style={styles.infoTitle}>{t('Toliq ismi')} </AppText>
<AppText style={styles.infoText}>{data.fullName} </AppText>
</View>
<View
@@ -135,8 +132,12 @@ const MyPassport = ({ getMe, myPassport }: Props) => {
: { flexBasis: '48%', alignItems: 'flex-start' },
]}
>
<Text style={styles.infoTitle}>{t('Passport seriya')}</Text>
<Text style={styles.infoText}>{data.passportSeries}</Text>
<AppText style={styles.infoTitle}>
{t('Passport seriya')}{' '}
</AppText>
<AppText style={styles.infoText}>
{data.passportSeries}{' '}
</AppText>
</View>
<View
@@ -147,10 +148,12 @@ const MyPassport = ({ getMe, myPassport }: Props) => {
: { flexBasis: '48%', alignItems: 'flex-end' },
]}
>
<Text style={styles.infoTitle}>{t('Tugilgan kun')}</Text>
<Text style={styles.infoText}>
<AppText style={styles.infoTitle}>
{t('Tugilgan kun')}{' '}
</AppText>
<AppText style={styles.infoText}>
{formatDate(data.birthDate)}
</Text>
</AppText>
</View>
<View
@@ -161,8 +164,10 @@ const MyPassport = ({ getMe, myPassport }: Props) => {
: { flexBasis: '48%', alignItems: 'flex-start' },
]}
>
<Text style={[styles.infoTitle]}>{t('Telefon raqami')}</Text>
<Text style={[styles.infoText]}>+{data.phone}</Text>
<AppText style={[styles.infoTitle]}>
{t('Telefon raqami')}{' '}
</AppText>
<AppText style={[styles.infoText]}>+{data.phone} </AppText>
</View>
<View
@@ -173,8 +178,10 @@ const MyPassport = ({ getMe, myPassport }: Props) => {
: { flexBasis: '48%', alignItems: 'flex-end' },
]}
>
<Text style={[styles.infoTitle]}>{t('Limit')}</Text>
<Text style={[styles.infoText]}>{data.availableLimit}$</Text>
<AppText style={[styles.infoTitle]}>{t('Limit')} </AppText>
<AppText style={[styles.infoText]}>
{data.availableLimit}${' '}
</AppText>
</View>
</View>
</View>
@@ -191,7 +198,7 @@ const styles = StyleSheet.create({
},
statusText: {
fontSize: 13,
fontWeight: '600',
fontFamily: 'GolosText-Bold',
},
card: {
backgroundColor: '#FFFFFF',
@@ -226,11 +233,6 @@ const styles = StyleSheet.create({
paddingHorizontal: 14,
paddingVertical: 4,
borderRadius: 20,
shadowColor: '#000',
shadowOffset: { width: 0, height: 2 },
shadowOpacity: 0.15,
shadowRadius: 3,
elevation: 3, // Android uchun chiroyli korinishi
},
infoTitle: {
color: '#979797',

View File

@@ -3,6 +3,7 @@ import type { NativeStackNavigationProp } from '@react-navigation/native-stack';
import { useQuery } from '@tanstack/react-query';
import { authApi } from 'api/auth';
import passportApi from 'api/passport';
import AppText from 'components/AppText';
import Layout from 'components/Layout';
import LoadingScreen from 'components/LoadingScreen';
import Navbar from 'components/Navbar';
@@ -14,7 +15,6 @@ import {
RefreshControl,
ScrollView,
StyleSheet,
Text,
TouchableOpacity,
View,
} from 'react-native';
@@ -91,18 +91,18 @@ const Passport = () => {
keyboardShouldPersistTaps="handled"
>
<View style={styles.header}>
<Text style={styles.title}>{t('Passportlarim')}</Text>
<AppText style={styles.title}>{t('Passportlarim')}</AppText>
</View>
{myPassport && myPassport.length === 0 ? (
<View style={styles.content}>
<View style={styles.emptyState}>
<PassportIcon color="#ccc" width={80} height={80} />
<Text style={styles.emptyText}>
<AppText style={styles.emptyText}>
{t("Hali pasport qo'shilmagan")}
</Text>
<Text style={styles.emptySubtext}>
</AppText>
<AppText style={styles.emptySubtext}>
{t("Yangi pasport qo'shish uchun tugmani bosing")}
</Text>
</AppText>
</View>
</View>
) : (
@@ -115,7 +115,9 @@ const Passport = () => {
activeOpacity={0.7}
>
<Plus color="#fff" width={24} height={24} />
<Text style={styles.addButtonText}>{t("Yangi pasport qo'shish")}</Text>
<AppText style={styles.addButtonText}>
{t("Yangi pasport qo'shish")}
</AppText>
</TouchableOpacity>
</Layout>
);
@@ -126,7 +128,7 @@ const styles = StyleSheet.create({
flex: 1,
},
header: {
paddingHorizontal: 20,
paddingHorizontal: 10,
paddingTop: 5,
},
title: {

View File

@@ -37,7 +37,7 @@ export const PassportStyle = StyleSheet.create({
},
title: {
fontSize: 24,
fontWeight: '600',
fontFamily: 'GolosText-Bold',
textAlign: 'center',
color: '#28A7E8',
marginBottom: 20,
@@ -155,7 +155,7 @@ export const PassportStyle = StyleSheet.create({
},
termsLink: {
color: '#28A7E8',
fontWeight: '600',
fontFamily: 'GolosText-Bold',
textDecorationLine: 'underline',
fontSize: 15,
},

View File

@@ -82,7 +82,7 @@ const styles = StyleSheet.create({
btnText: {
color: '#FFFFFF',
fontSize: 18,
fontWeight: '600',
fontFamily: 'GolosText-Bold',
},
});

View File

@@ -1,5 +1,6 @@
import { useQuery } from '@tanstack/react-query';
import { authApi } from 'api/auth';
import AppText from 'components/AppText';
import React, { useState } from 'react';
import { useTranslation } from 'react-i18next';
import {
@@ -7,7 +8,6 @@ import {
Image,
Linking,
StyleSheet,
Text,
TouchableOpacity,
View,
} from 'react-native';
@@ -157,9 +157,9 @@ const ProfileHeader = ({ userName = 'Samandar' }: { userName?: string }) => {
<View style={styles.container}>
<View style={styles.imageWrapper}>
{imageError ? (
<Text style={styles.fallbackText}>
<AppText style={styles.fallbackText}>
{getMe?.fullName.charAt(0).toUpperCase()}
</Text>
</AppText>
) : (
<Image
source={{ uri: selectedImage }}
@@ -173,9 +173,9 @@ const ProfileHeader = ({ userName = 'Samandar' }: { userName?: string }) => {
</View>
<View style={styles.infoUser}>
<Text style={styles.name}>
<AppText style={styles.name}>
{capitalizeWords(getMe?.fullName || '')}
</Text>
</AppText>
{getMe?.status && (
<View
style={[
@@ -183,20 +183,20 @@ const ProfileHeader = ({ userName = 'Samandar' }: { userName?: string }) => {
{ backgroundColor: getStatusMeta(getMe.status).bg },
]}
>
<Text
<AppText
style={[
styles.statusText,
{ color: getStatusMeta(getMe.status).fg },
]}
>
{getStatusMeta(getMe.status).label}
</Text>
</AppText>
</View>
)}
<Text style={styles.userId}>ID: {getMe?.aviaCargoId}</Text>
<Text style={styles.telUser}>
<AppText style={styles.userId}>ID: {getMe?.aviaCargoId}</AppText>
<AppText style={styles.telUser}>
{getMe?.phone ? formatPhone(getMe.phone) : ''}
</Text>
</AppText>
</View>
<View style={styles.links}>
@@ -225,13 +225,15 @@ const ProfileHeader = ({ userName = 'Samandar' }: { userName?: string }) => {
<View style={styles.modalContent}>
<TouchableOpacity style={styles.modalBtn} onPress={openGallery}>
<GalleryEdit fill="#28A7E8" width={26} height={26} />
<Text style={styles.modalText}>{t("Rasmni o'zgartirish")}</Text>
<AppText style={styles.modalText}>
{t("Rasmni o'zgartirish")}
</AppText>
</TouchableOpacity>
<TouchableOpacity style={styles.modalBtn} onPress={removePhoto}>
<Trash color="red" width={26} height={26} />
<Text style={[styles.modalText, { color: 'red' }]}>
<AppText style={[styles.modalText, { color: 'red' }]}>
{t("Rasmni o'chirish")}
</Text>
</AppText>
</TouchableOpacity>
</View>
</Modal>
@@ -281,15 +283,10 @@ const styles = StyleSheet.create({
paddingHorizontal: 14,
paddingVertical: 4,
borderRadius: 20,
shadowColor: '#000',
shadowOffset: { width: 0, height: 2 },
shadowOpacity: 0.15,
shadowRadius: 3,
elevation: 3, // Android uchun chiroyli korinishi
},
statusText: {
fontSize: 13,
fontWeight: '600',
fontFamily: 'GolosText-Bold',
},
infoUser: {
marginTop: 10,
@@ -300,7 +297,7 @@ const styles = StyleSheet.create({
},
userId: {
textAlign: 'center',
fontWeight: '600',
fontFamily: 'GolosText-Bold',
fontSize: 30,
color: '#28A7E8',
},

View File

@@ -1,13 +1,14 @@
import AsyncStorage from '@react-native-async-storage/async-storage';
import { useNavigation } from '@react-navigation/native';
import { NativeStackNavigationProp } from '@react-navigation/native-stack';
import AppText from 'components/AppText';
import * as React from 'react';
import { useTranslation } from 'react-i18next';
import {
Alert,
Linking,
Platform,
StyleSheet,
Text,
TouchableOpacity,
View,
} from 'react-native';
@@ -75,10 +76,11 @@ const ProfilePages = (props: componentNameProps) => {
>
<View style={[{ flexDirection: 'row', alignItems: 'center', gap: 10 }]}>
<Setting color="#373737" width={24} height={24} />
<Text style={styles.title}>{t('Sozlamalar')}</Text>
<AppText style={styles.title}>{t('Sozlamalar')}</AppText>
</View>
<ArrowRightUnderline color="#373737" width={24} height={24} />
</TouchableOpacity>
{Platform.OS === 'android' && (
<TouchableOpacity
style={[
styles.card,
@@ -88,10 +90,11 @@ const ProfilePages = (props: componentNameProps) => {
>
<View style={{ flexDirection: 'row', alignItems: 'center', gap: 10 }}>
<Bell color="#373737" width={24} height={24} />
<Text style={styles.title}>{t('Bildirishnomalar')}</Text>
<AppText style={styles.title}>{t('Bildirishnomalar')}</AppText>
</View>
<ArrowRightUnderline color="#373737" width={24} height={24} />
</TouchableOpacity>
)}
<TouchableOpacity
style={[
styles.card,
@@ -101,7 +104,7 @@ const ProfilePages = (props: componentNameProps) => {
>
<View style={{ flexDirection: 'row', alignItems: 'center', gap: 10 }}>
<Location color="#373737" width={24} height={24} />
<Text style={styles.title}>{t('Xitoy omborlari manzili')}</Text>
<AppText style={styles.title}>{t('Xitoy omborlari manzili')}</AppText>
</View>
<ArrowRightUnderline color="#373737" width={24} height={24} />
</TouchableOpacity>
@@ -114,7 +117,7 @@ const ProfilePages = (props: componentNameProps) => {
>
<View style={{ flexDirection: 'row', alignItems: 'center', gap: 10 }}>
<Support color="#373737" width={24} height={24} />
<Text style={styles.title}>{t('Yordam markazi')}</Text>
<AppText style={styles.title}>{t('Yordam markazi')}</AppText>
</View>
<ArrowRightUnderline color="#373737" width={24} height={24} />
</TouchableOpacity>
@@ -124,9 +127,9 @@ const ProfilePages = (props: componentNameProps) => {
onPress={handleLogout}
>
<Logout color="#F06363" width={24} height={24} />
<Text style={[styles.title, { color: '#F06363' }]}>
<AppText style={[styles.title, { color: '#F06363' }]}>
{t('Chiqish')}
</Text>
</AppText>
</TouchableOpacity>
</View>
<View
@@ -142,9 +145,9 @@ const ProfilePages = (props: componentNameProps) => {
>
<View style={{ flexDirection: 'row', alignItems: 'center', gap: 10 }}>
<Trash color="#F06363" width={24} height={24} />
<Text style={[styles.title, { color: '#F06363' }]}>
<AppText style={[styles.title, { color: '#F06363' }]}>
{t('Hisobingizni ochirish')}
</Text>
</AppText>
</View>
</View>
</View>

View File

@@ -1,4 +1,5 @@
import AsyncStorage from '@react-native-async-storage/async-storage';
import AppText from 'components/AppText';
import LayoutTwo from 'components/LayoutTwo';
import NoResult from 'components/NoResult';
import * as React from 'react';
@@ -7,7 +8,6 @@ import {
RefreshControl,
ScrollView,
StyleSheet,
Text,
TouchableOpacity,
} from 'react-native';
import Clock from 'svg/Clock';
@@ -68,7 +68,7 @@ const Notifications = () => {
style={styles.card}
key={item.id}
>
<Text style={styles.text}>{item.message}</Text>
<AppText style={styles.text}>{item.message}</AppText>
<Clock color="#000000" />
</TouchableOpacity>
))

View File

@@ -1,12 +1,7 @@
import AppText from 'components/AppText';
import React, { useEffect, useRef } from 'react';
import { useTranslation } from 'react-i18next';
import {
Animated,
StyleSheet,
Text,
TouchableOpacity,
View,
} from 'react-native';
import { Animated, StyleSheet, TouchableOpacity, View } from 'react-native';
import CloseIcon from 'svg/Close';
import { NotificationsData } from '../lib/data';
@@ -58,7 +53,7 @@ const NotificationsModal = ({ visible, setVisible, selectedOrder }: Props) => {
]}
>
<View style={styles.header}>
<Text style={styles.title}>{selectedOrder.title}</Text>
<AppText style={styles.title}>{selectedOrder.title}</AppText>
<TouchableOpacity onPress={closeModal} style={styles.closeBtn}>
<CloseIcon width={15} height={15} color={'#000'} />
</TouchableOpacity>
@@ -66,9 +61,9 @@ const NotificationsModal = ({ visible, setVisible, selectedOrder }: Props) => {
<View style={styles.divider} />
<Text style={styles.sectionTitle}>{selectedOrder.message}</Text>
<AppText style={styles.sectionTitle}>{selectedOrder.message}</AppText>
<TouchableOpacity onPress={closeModal} style={styles.btn}>
<Text style={styles.btnText}>{t('Yopish')}</Text>
<AppText style={styles.btnText}>{t('Yopish')}</AppText>
</TouchableOpacity>
</Animated.View>
</View>
@@ -105,7 +100,7 @@ const styles = StyleSheet.create({
},
title: {
fontSize: 18,
fontWeight: '600',
fontFamily: 'GolosText-Bold',
},
closeBtn: {
padding: 5,
@@ -123,7 +118,7 @@ const styles = StyleSheet.create({
},
sectionTitle: {
fontSize: 16,
fontWeight: '600',
fontFamily: 'GolosText-Bold',
paddingHorizontal: 20,
marginBottom: 8,
},
@@ -159,11 +154,11 @@ const styles = StyleSheet.create({
},
totalLabel: {
fontSize: 16,
fontWeight: '600',
fontFamily: 'GolosText-Bold',
},
totalValue: {
fontSize: 16,
fontWeight: '600',
fontFamily: 'GolosText-Bold',
color: '#28A7E8',
},
btn: {
@@ -179,7 +174,7 @@ const styles = StyleSheet.create({
textAlign: 'center',
color: '#fff',
fontSize: 16,
fontWeight: '600',
fontFamily: 'GolosText-Bold',
},
});

View File

@@ -1,442 +1,13 @@
import AsyncStorage from '@react-native-async-storage/async-storage';
import { useNavigation, useRoute } from '@react-navigation/native';
import { NativeStackNavigationProp } from '@react-navigation/native-stack';
import React, { useEffect, useRef, useState } from 'react';
import {
Alert,
Dimensions,
PanResponder,
StyleSheet,
Text,
TextInput,
TouchableOpacity,
UIManager,
View,
findNodeHandle,
} from 'react-native';
import { CodeField, Cursor } from 'react-native-confirmation-code-field';
import { SafeAreaView } from 'react-native-safe-area-context';
import Svg, { Line } from 'react-native-svg';
const LOCK_ENABLED = 'LOCK_ENABLED';
const LOCK_TYPE = 'LOCK_TYPE';
const LOCK_PASSWORD = 'LOCK_PASSWORD';
const LOCK_PATTERN = 'LOCK_PATTERN';
type LockType = 'pin' | 'password' | 'pattern';
type PatternLockProps = {
path: number[];
setPath: React.Dispatch<React.SetStateAction<number[]>>;
onPatternComplete: (pattern: string | null) => void;
patternError?: boolean;
};
const PatternLock = ({
path,
setPath,
onPatternComplete,
patternError,
}: PatternLockProps) => {
const { width } = Dimensions.get('window');
const size = width * 0.8;
const cellSize = size / 3;
const containerRef = useRef<View>(null);
const [layout, setLayout] = useState({ pageX: 0, pageY: 0 });
const [currentPos, setCurrentPos] = useState<{ x: number; y: number } | null>(
null,
);
const points = Array.from({ length: 9 }, (_, i) => ({
id: i + 1,
x: (i % 3) * cellSize + cellSize / 2,
y: Math.floor(i / 3) * cellSize + cellSize / 2,
}));
const panResponder = PanResponder.create({
onStartShouldSetPanResponder: () => true,
onMoveShouldSetPanResponder: () => true,
onPanResponderGrant: () => {
setPath([]); // yangi chizma
setCurrentPos(null);
},
onPanResponderMove: (_e, gestureState) => {
const x = gestureState.moveX - layout.pageX;
const y = gestureState.moveY - layout.pageY;
setCurrentPos({ x, y });
const point = points.find(
p =>
Math.abs(p.x - x) < cellSize / 3 && Math.abs(p.y - y) < cellSize / 3,
);
if (point && !path.includes(point.id)) {
setPath(prev => {
const newPath = [...prev, point.id];
return newPath;
});
}
},
onPanResponderRelease: () => {
setCurrentPos(null);
onPatternComplete(path.length > 0 ? path.join('') : null);
},
});
useEffect(() => {
if (containerRef.current) {
const handle = findNodeHandle(containerRef.current);
if (handle) {
UIManager.measure(handle, (_x, _y, _w, _h, pageX, pageY) => {
setLayout({ pageX, pageY });
});
}
}
}, []);
return (
<View
ref={containerRef}
style={[styles.patternContainer, { width: size, height: size }]}
{...panResponder.panHandlers}
>
<Svg style={StyleSheet.absoluteFill}>
{path.map((id, idx) => {
if (idx === 0) return null;
const from = points.find(p => p.id === path[idx - 1]);
const to = points.find(p => p.id === id);
if (!from || !to) return null;
return (
<Line
key={`${from.id}-${to.id}`}
x1={from.x}
y1={from.y}
x2={to.x}
y2={to.y}
stroke="#28A7E8"
strokeWidth={4}
/>
);
})}
{currentPos && path.length > 0 && (
<Line
x1={points.find(p => p.id === path[path.length - 1])?.x}
y1={points.find(p => p.id === path[path.length - 1])?.y}
x2={currentPos.x}
y2={currentPos.y}
stroke="#28A7E8"
strokeWidth={2}
strokeDasharray="4"
/>
)}
</Svg>
{points.map(point => (
<View
key={point.id}
style={[
styles.patternPoint,
path.includes(point.id)
? patternError
? styles.patternPointError
: styles.patternPointActive
: {},
{ left: point.x - 15, top: point.y - 15 },
]}
/>
))}
</View>
);
};
import AppText from 'components/AppText';
import React from 'react';
import { View } from 'react-native';
const AddedLock = () => {
const [step, setStep] = useState<1 | 2>(1);
const [password, setPassword] = useState('');
const [confirmPassword, setConfirmPassword] = useState('');
// Pattern states
const [patternPath, setPatternPath] = useState<number[]>([]);
const [patternTemp, setPatternTemp] = useState<string | null>(null);
const [patternConfirmed, setPatternConfirmed] = useState(false);
const [patternError, setPatternError] = useState(false);
const route = useRoute<any>();
const navigation = useNavigation<NativeStackNavigationProp<any>>();
const paramLockType = route.params?.lockType;
const validLockTypes: LockType[] = ['pin', 'password', 'pattern'];
const initialLockType: LockType = validLockTypes.includes(paramLockType)
? paramLockType
: 'pin';
const [lockType] = useState<LockType>(initialLockType);
const onContinue = async () => {
if (step === 1) {
if (lockType === 'pattern') {
if (!patternTemp) {
return Alert.alert('Error', 'Please draw your pattern first');
}
setPatternPath([]); // clear for second step
} else {
if (!password) {
return Alert.alert('Error', 'Please enter your PIN/Password');
}
}
setStep(2);
return;
}
if (lockType === 'pattern') {
if (!patternConfirmed) {
return Alert.alert('Error', 'Please confirm your pattern');
}
await AsyncStorage.setItem(LOCK_PATTERN, patternTemp!);
} else {
if (!confirmPassword) {
return Alert.alert('Error', 'Please confirm your PIN/Password');
}
if (password !== confirmPassword) {
return Alert.alert('Error', 'Values do not match');
}
await AsyncStorage.setItem(LOCK_PASSWORD, password);
}
await AsyncStorage.setItem(LOCK_ENABLED, 'true');
await AsyncStorage.setItem(LOCK_TYPE, lockType);
Alert.alert('Success', 'Lock settings saved');
resetForm();
navigation.goBack();
};
const resetForm = () => {
setStep(1);
setPassword('');
setConfirmPassword('');
setPatternPath([]);
setPatternTemp(null);
setPatternConfirmed(false);
};
const handlePatternComplete = (inputPattern: string | null) => {
if (!inputPattern || inputPattern.length < 4) {
setPatternError(true);
setTimeout(() => {
setPatternError(false);
setPatternPath([]);
}, 800);
return;
}
if (step === 1) {
setPatternTemp(inputPattern);
} else {
if (patternTemp && inputPattern === patternTemp) {
setPatternConfirmed(true);
Alert.alert('Success', 'Pattern confirmed');
} else {
setPatternError(true);
setTimeout(() => {
setPatternError(false);
setStep(1);
setPatternPath([]);
}, 800);
}
}
};
return (
<SafeAreaView style={{ flex: 1 }}>
<View style={styles.container}>
<View style={styles.lockCard}>
{lockType === 'pattern' ? (
<View style={{ alignItems: 'center' }}>
{step === 1 ? (
<>
<Text style={{ textAlign: 'center', marginBottom: 10 }}>
Draw your pattern
</Text>
<PatternLock
path={patternPath}
setPath={setPatternPath}
onPatternComplete={handlePatternComplete}
patternError={patternError}
/>
</>
) : (
<>
<Text style={{ textAlign: 'center', marginBottom: 10 }}>
Confirm your pattern
</Text>
<PatternLock
path={patternPath}
setPath={setPatternPath}
onPatternComplete={handlePatternComplete}
/>
</>
)}
<View>
<AppText>AddedLock</AppText>
</View>
) : lockType === 'pin' ? (
<>
{step === 1 ? (
<>
<Text style={{ textAlign: 'center', marginBottom: 10 }}>
Enter PIN
</Text>
<CodeField
value={password}
onChangeText={setPassword}
cellCount={4}
rootStyle={{ marginBottom: 20 }}
keyboardType="number-pad"
renderCell={({ index, symbol, isFocused }) => (
<View
key={index}
style={[
styles.pinCell,
isFocused && styles.pinCellFocused,
]}
>
<Text style={{ fontSize: 24 }}>
{symbol || (isFocused ? <Cursor /> : null)}
</Text>
</View>
)}
/>
</>
) : (
<>
<Text style={{ textAlign: 'center', marginBottom: 10 }}>
Confirm PIN
</Text>
<CodeField
value={confirmPassword}
onChangeText={setConfirmPassword}
cellCount={4}
rootStyle={{ marginBottom: 20 }}
keyboardType="number-pad"
renderCell={({ index, symbol, isFocused }) => (
<View
key={index}
style={[
styles.pinCell,
isFocused && styles.pinCellFocused,
]}
>
<Text style={{ fontSize: 24 }}>
{symbol || (isFocused ? <Cursor /> : null)}
</Text>
</View>
)}
/>
</>
)}
</>
) : (
<>
{step === 1 ? (
<TextInput
placeholder="Enter Password"
secureTextEntry
style={styles.input}
value={password}
onChangeText={setPassword}
/>
) : (
<TextInput
placeholder="Confirm Password"
secureTextEntry
style={styles.input}
value={confirmPassword}
onChangeText={setConfirmPassword}
/>
)}
</>
)}
</View>
<View style={styles.btnCard}>
<TouchableOpacity
style={[styles.button, styles.removeButton]}
onPress={() => {
resetForm();
navigation.goBack();
}}
>
<Text style={styles.buttonText}>Bekor qilish</Text>
</TouchableOpacity>
<TouchableOpacity style={styles.button} onPress={onContinue}>
<Text style={styles.buttonText}>
{step === 1 ? 'Davom etish' : 'Saqlash'}
</Text>
</TouchableOpacity>
</View>
</View>
</SafeAreaView>
);
};
const styles = StyleSheet.create({
container: { flex: 1 },
btnCard: {
position: 'absolute',
flexDirection: 'row',
bottom: 5,
width: '100%',
justifyContent: 'center',
gap: 10,
},
patternContainer: {
borderRadius: 10,
justifyContent: 'center',
alignItems: 'center',
},
patternPoint: {
width: 30,
height: 30,
borderRadius: 15,
backgroundColor: '#ddd',
position: 'absolute',
},
patternPointActive: { backgroundColor: '#28A7E8' },
pinCell: {
borderWidth: 1,
borderColor: '#ccc',
borderRadius: 8,
width: 50,
height: 50,
justifyContent: 'center',
alignItems: 'center',
margin: 5,
},
pinCellFocused: { borderColor: '#28A7E8' },
input: {
borderWidth: 1,
borderColor: '#ccc',
borderRadius: 8,
padding: 15,
marginBottom: 15,
fontSize: 16,
},
button: {
backgroundColor: '#28A7E8',
padding: 15,
borderRadius: 8,
alignItems: 'center',
width: '48%',
},
removeButton: { backgroundColor: '#ccc' },
buttonText: { color: '#fff', fontSize: 16, fontWeight: 'bold' },
lockCard: {
height: '100%',
justifyContent: 'center',
width: '95%',
margin: 'auto',
},
patternPointError: { backgroundColor: 'red' },
});
export default AddedLock;

View File

@@ -1,3 +1,4 @@
import AppText from 'components/AppText';
import LayoutTwo from 'components/LayoutTwo';
import * as React from 'react';
import { useTranslation } from 'react-i18next';
@@ -7,7 +8,6 @@ import {
RefreshControl,
ScrollView,
StyleSheet,
Text,
TouchableOpacity,
View,
} from 'react-native';
@@ -53,9 +53,9 @@ const Settings = () => {
contentContainerStyle={{ paddingBottom: 10 }}
>
<View style={{ marginTop: 10, width: '95%', margin: 'auto' }}>
<Text style={{ fontSize: 20, fontWeight: '500' }}>
<AppText style={{ fontSize: 20, fontWeight: '500' }}>
{t('select_language')}
</Text>
</AppText>
{languages.map(item => {
const isSelected = selectedLang?.code === item.code;
const isLoading = loadingLang === item.code;
@@ -85,14 +85,14 @@ const Settings = () => {
source={item.Icon}
style={{ width: 30, height: 30, resizeMode: 'contain' }}
/>
<Text
<AppText
style={[
styles.label,
{ color: isSelected ? '#28A7E8' : '#000000' },
]}
>
{item.label}
</Text>
</AppText>
</View>
<View
style={[

View File

@@ -1,13 +1,8 @@
import { useNavigation } from '@react-navigation/native';
import { NativeStackNavigationProp } from '@react-navigation/native-stack';
import AppText from 'components/AppText';
import NavbarBack from 'components/NavbarBack';
import {
ScrollView,
StyleSheet,
Text,
TouchableOpacity,
View,
} from 'react-native';
import { ScrollView, StyleSheet, TouchableOpacity, View } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import ArrowRightUnderline from 'svg/ArrowRightUnderline';
@@ -19,14 +14,14 @@ const SettingsLock = () => {
<NavbarBack title="Parol o'rnatish" />
<ScrollView>
<View style={{ width: '95%', margin: 'auto', marginTop: 20 }}>
<Text style={styles.title}>Parol turini tanlang</Text>
<AppText style={styles.title}>Parol turini tanlang</AppText>
<TouchableOpacity
style={[styles.card]}
onPress={() =>
navigation.navigate('AddLock', { lockType: 'pin' })
}
>
<Text style={styles.label}>Pin-kod</Text>
<AppText style={styles.label}>Pin-kod</AppText>
<ArrowRightUnderline color="#383838" />
</TouchableOpacity>
@@ -36,7 +31,7 @@ const SettingsLock = () => {
navigation.navigate('AddLock', { lockType: 'password' })
}
>
<Text style={styles.label}>Parol</Text>
<AppText style={styles.label}>Parol</AppText>
<ArrowRightUnderline color="#383838" />
</TouchableOpacity>
@@ -46,7 +41,7 @@ const SettingsLock = () => {
navigation.navigate('AddLock', { lockType: 'pattern' })
}
>
<Text style={styles.label}>Chizma</Text>
<AppText style={styles.label}>Chizma</AppText>
<ArrowRightUnderline color="#383838" />
</TouchableOpacity>
</View>

View File

@@ -1,3 +1,4 @@
import AppText from 'components/AppText';
import NavbarBack from 'components/NavbarBack';
import * as React from 'react';
import { useTranslation } from 'react-i18next';
@@ -7,7 +8,6 @@ import {
RefreshControl,
ScrollView,
StyleSheet,
Text,
TextInput,
TouchableOpacity,
View,
@@ -85,11 +85,11 @@ const Support = (props: SupportProps) => {
msg.fromUser ? styles.userBubble : styles.supportBubble,
]}
>
<Text
<AppText
style={msg.fromUser ? styles.userText : styles.supportText}
>
{msg.text}
</Text>
</AppText>
</View>
))}
</ScrollView>
@@ -102,7 +102,7 @@ const Support = (props: SupportProps) => {
placeholderTextColor="#999"
/>
<TouchableOpacity onPress={sendMessage} style={styles.sendButton}>
<Text style={styles.sendButtonText}>{t('Yuborish')}</Text>
<AppText style={styles.sendButtonText}>{t('Yuborish')}</AppText>
</TouchableOpacity>
</View>
</KeyboardAvoidingView>
@@ -176,6 +176,6 @@ const styles = StyleSheet.create({
sendButtonText: {
color: '#fff',
fontSize: 14,
fontWeight: '600',
fontFamily: 'GolosText-Bold',
},
});

View File

@@ -2,12 +2,12 @@ import Clipboard from '@react-native-clipboard/clipboard';
import { useQuery } from '@tanstack/react-query';
import { authApi } from 'api/auth';
import warhouses_api from 'api/warhouses';
import AppText from 'components/AppText';
import React from 'react';
import { useTranslation } from 'react-i18next';
import {
FlatList,
StyleSheet,
Text,
TouchableOpacity,
useWindowDimensions,
View,
@@ -108,11 +108,11 @@ const TabsAutoWarehouses = () => {
<View style={[styles.card, { marginRight: isLast ? 0 : 10 }]}>
<View style={styles.titleCard}>
<Kitay width={24 * scale} height={24 * scale} />
<Text style={styles.title}>China (Auto)</Text>
<AppText style={styles.title}>China (Auto)</AppText>
</View>
<View style={styles.infoId}>
<View style={{ gap: 4 * scale, width: '90%' }}>
<Text style={styles.infoText}>{item}</Text>
<AppText style={styles.infoText}>{item}</AppText>
</View>
<TouchableOpacity onPress={() => handleCopy(item.addressInfo)}>
<Copy color="#28A7E8" width={24 * scale} height={24 * scale} />
@@ -141,7 +141,7 @@ const makeStyles = (scale: number, cardWidth: number, screenWidth: number) =>
},
title: {
fontSize: 20 * scale,
fontWeight: '600',
fontFamily: 'GolosText-Bold',
color: '#101623CC',
},
infoId: {

View File

@@ -2,12 +2,12 @@ import Clipboard from '@react-native-clipboard/clipboard';
import { useQuery } from '@tanstack/react-query';
import { authApi } from 'api/auth';
import warhouses_api from 'api/warhouses';
import AppText from 'components/AppText';
import React from 'react';
import { useTranslation } from 'react-i18next';
import {
FlatList,
StyleSheet,
Text,
TouchableOpacity,
useWindowDimensions,
View,
@@ -108,11 +108,11 @@ const TabsAviaWarehouses = () => {
<View style={[styles.card, { marginRight: isLast ? 0 : 10 }]}>
<View style={styles.titleCard}>
<Kitay width={24 * scale} height={24 * scale} />
<Text style={styles.title}>China (Auto)</Text>
<AppText style={styles.title}>China (Auto)</AppText>
</View>
<View style={styles.infoId}>
<View style={{ gap: 4 * scale, width: '90%' }}>
<Text style={styles.infoText}>{item}</Text>
<AppText style={styles.infoText}>{item}</AppText>
</View>
<TouchableOpacity onPress={() => handleCopy(item.addressInfo)}>
<Copy color="#28A7E8" width={24 * scale} height={24 * scale} />
@@ -141,7 +141,7 @@ const makeStyles = (scale: number, cardWidth: number, screenWidth: number) =>
},
title: {
fontSize: 20 * scale,
fontWeight: '600',
fontFamily: 'GolosText-Bold',
color: '#101623CC',
},
infoId: {

View File

@@ -1,5 +1,6 @@
import { useQuery } from '@tanstack/react-query';
import { authApi } from 'api/auth';
import AppText from 'components/AppText';
import SingleFileDrop from 'components/FileDrop';
import LayoutTwo from 'components/LayoutTwo';
import * as React from 'react';
@@ -7,13 +8,14 @@ import { useTranslation } from 'react-i18next';
import {
ActivityIndicator,
Image,
Linking,
RefreshControl,
ScrollView,
StyleSheet,
Text,
TouchableOpacity,
View,
} from 'react-native';
import AppLink from 'react-native-app-link';
import Toast from 'react-native-toast-message';
import Shablon from 'screens/../../assets/bootsplash/shablon.jpg';
import TabsAutoWarehouses from './TabsAutoWarehouses';
@@ -96,6 +98,19 @@ Cargo Idsi: ${getMe?.aviaCargoId}
() => ({ paddingBottom: 10 }),
[],
);
const openTelegram = React.useCallback(async () => {
try {
await AppLink.maybeOpenURL('tg://resolve?domain=cpostuz', {
appName: 'Telegram',
appStoreId: 686449807,
appStoreLocale: 'us',
playStoreId: 'org.telegram.messenger',
});
} catch (err) {
// Agar ilovani ham, storeni ham ochib bolmasa, fallback URL
Linking.openURL('https://t.me/cpostuz');
}
}, []);
return (
<LayoutTwo title={t('Xitoy omborlari manzili')}>
<ScrollView
@@ -104,39 +119,84 @@ Cargo Idsi: ${getMe?.aviaCargoId}
contentContainerStyle={contentContainerStyle}
>
<View style={styles.card}>
<Text style={styles.title}>{t('Bizning Xitoy manzilimiz')}</Text>
<Text style={styles.text}>
<AppText style={[styles.title]}>
{t('Bizning Xitoy manzilimiz')}
</AppText>
<AppText style={[styles.text]}>
{t(
'Taobao, pinduoduo, 1688 ,alibaba va Xitoyning istalgan platformasiga kiritish uchun',
)}
</Text>
</AppText>
<TabsAviaWarehouses />
<TabsAutoWarehouses />
<Text style={styles.title}>
<AppText style={[styles.title]}>
{t('Xitoy omborlarimiz manzilini programmaga kiriting')}
</Text>
</AppText>
<View style={{ gap: 20 }}>
<Text style={styles.text}>
<AppText style={[styles.text]}>
{t(
"Diqqat! Iltimos, Xitoy omborimiz manzilini Xitoy programmalariga kiritganingizdan so'ng, kiritilgan holatdagi skrenshotni bizga yuborib, tekshirtiring",
)}
</Text>
<Text style={styles.text}>
</AppText>
<AppText style={[styles.text]}>
{t(
"Xitoy ombori manzilini to'g'ri kiritish, mahsulotingiz yo'qolib qolish oldini oladi.",
)}
</Text>
<Text style={styles.text}>
</AppText>
<AppText style={[styles.text]}>
{t(
"Agar sizda savol tug'ilsa yoki biron narsaga tushunmasangiz bizga murojaat qiling",
)}
</Text>
</AppText>
</View>
<Text style={styles.title}>{t('Skrenshot rasmini yuklang')}</Text>
<AppText style={[styles.title]}>
{t('Skrenshot rasmini yuklang')}
</AppText>
<Image
source={Shablon}
style={{ width: '100%', height: 500, objectFit: 'cover' }}
style={{ width: '100%', height: 400, objectFit: 'cover' }}
/>
<View
style={{
backgroundColor: '#ffff',
padding: 8,
borderRadius: 8,
shadowColor: '#000',
shadowOffset: { width: 0, height: 2 },
shadowOpacity: 0.15,
shadowRadius: 3,
elevation: 3,
}}
>
<AppText style={[{ fontSize: 16, fontWeight: 500 }]}>
{t(
"Hurmatli mijoz, ushbu berilgan ID manzil, ma'lumotlarni siz shu namunadagidek 1- va 4- qatorlarga oʻz ID kodingizni yozing! Aks holda sizning kargoingiz bilan muammo chiqishi mumkin.",
)}
</AppText>
</View>
<View
style={{
backgroundColor: '#fff',
padding: 8,
marginTop: 6,
borderRadius: 8,
shadowColor: '#000',
shadowOffset: { width: 0, height: 2 },
shadowOpacity: 0.15,
shadowRadius: 3,
elevation: 3,
}}
>
<AppText style={[{ fontSize: 16, fontWeight: '500' }]}>
{t(
'Ilovaga kirib huddi shunday toldirganingizdan keyin ekranni rasmga(skrinshot) olib, sizga bot tomonidan berilgan ID kod vamanzilni ushbu',
)}{' '}
<AppText style={{ color: '#28A7E8' }} onPress={openTelegram}>
@cpost_admin
</AppText>{' '}
{t('admindan tasdiqlatib olishingiz kerak boladi.')}
</AppText>
</View>
<SingleFileDrop
title={t('Rasmni shu yerga yuklang')}
onFileSelected={setBackImage}
@@ -150,7 +210,9 @@ Cargo Idsi: ${getMe?.aviaCargoId}
{isLoading ? (
<ActivityIndicator size="small" color="#fff" />
) : (
<Text style={styles.btnText}>{t('Manzilni tekshirish')}</Text>
<AppText style={[styles.btnText]}>
{t('Manzilni tekshirish')}
</AppText>
)}
</TouchableOpacity>
</View>

View File

@@ -1,10 +1,10 @@
import { PacketsData } from 'api/packets';
import AppText from 'components/AppText';
import React from 'react';
import { useTranslation } from 'react-i18next';
import {
FlatList,
StyleSheet,
Text,
TouchableOpacity,
View,
useWindowDimensions,
@@ -50,14 +50,14 @@ const Filter = ({
onPress={() => setOpen(prev => !prev)}
>
<FilterIcon color="#000000" width={18} height={18} />
<Text style={styles.text}>{t('Filter')}</Text>
<AppText style={styles.text}>{t('Filter')}</AppText>
</TouchableOpacity>
{open && (
<View style={styles.dropdown}>
{/* Header */}
<View style={styles.dropdownHeader}>
<Text style={styles.sectionTitle}>{t('Transport')}</Text>
<AppText style={styles.sectionTitle}>{t('Transport')}</AppText>
<TouchableOpacity onPress={() => setOpen(false)}>
<CloseIcon />
</TouchableOpacity>
@@ -82,19 +82,19 @@ const Filter = ({
setOpen(false);
}}
>
<Text
<AppText
style={[
styles.typeText,
selectedType === type && styles.activeTypeText,
]}
>
{type === 'AUTO' ? t('Avto') : t('Avia')}
</Text>
</AppText>
</TouchableOpacity>
)}
/>
<Text style={styles.sectionTitle}>{t('Reys raqami')}</Text>
<AppText style={styles.sectionTitle}>{t('Reys raqami')}</AppText>
<FlatList
data={[{ id: 'all', packetName: 'all' }, ...newOrders]}
keyExtractor={item => item.id?.toString() || 'all'}
@@ -113,7 +113,7 @@ const Filter = ({
setOpen(false);
}}
>
<Text
<AppText
style={[
styles.flightText,
selectedFlight === item.packetName &&
@@ -121,7 +121,7 @@ const Filter = ({
]}
>
{item.packetName === 'all' ? t('Barchasi') : item.packetName}
</Text>
</AppText>
</TouchableOpacity>
)}
/>
@@ -176,7 +176,7 @@ const makeStyles = () =>
marginBottom: 10,
},
sectionTitle: {
fontWeight: '600',
fontFamily: 'GolosText-Bold',
marginBottom: 6,
color: '#333',
fontSize: 16,

View File

@@ -1,13 +1,8 @@
import { PacketsData } from 'api/packets';
import AppText from 'components/AppText';
import React, { useCallback, useMemo } from 'react';
import { useTranslation } from 'react-i18next';
import {
FlatList,
StyleSheet,
Text,
TouchableOpacity,
View,
} from 'react-native';
import { FlatList, StyleSheet, TouchableOpacity, View } from 'react-native';
import Auto from 'svg/Auto';
import Avia from 'svg/Avia';
import BagIcon from 'svg/BagIcon';
@@ -147,7 +142,7 @@ const Order = ({ data, openModal, selectedData }: Props) => {
},
]}
>
<Text
<AppText
style={[
styles.statusText,
{ color: statusColorMap[item.deliveryStatus] },
@@ -157,25 +152,27 @@ const Order = ({ data, openModal, selectedData }: Props) => {
tabList.find(tab => tab.value === item.deliveryStatus)
?.label || '',
)}
</Text>
</AppText>
</View>
{/* Info */}
<View style={styles.infoCard}>
<Text style={styles.infoTitle}>{t('Reys raqami')}</Text>
<Text
<AppText style={styles.infoTitle}>{t('Reys raqami')}</AppText>
<AppText
style={[styles.infoText, { width: '50%', textAlign: 'right' }]}
>
{item.packetName}
</Text>
</AppText>
</View>
<View style={styles.infoCard}>
<Text style={styles.infoTitle}>{t('Mahsulotlar ogirligi')}</Text>
<Text style={styles.infoText}>{item.weight}</Text>
<AppText style={styles.infoTitle}>
{t('Mahsulotlar ogirligi')}
</AppText>
<AppText style={styles.infoText}>{item.weight}</AppText>
</View>
<View style={styles.infoCard}>
<Text style={styles.infoTitle}>{t('Umumiy narxi')}</Text>
<Text style={styles.infoText}>{item.totalPrice}</Text>
<AppText style={styles.infoTitle}>{t('Umumiy narxi')}</AppText>
<AppText style={styles.infoText}>{item.totalPrice}</AppText>
</View>
</View>
</TouchableOpacity>
@@ -192,10 +189,10 @@ const Order = ({ data, openModal, selectedData }: Props) => {
return (
<View style={styles.container}>
<View style={styles.count}>
<Text style={styles.title}>{t('Buyurtmalar soni')}</Text>
<Text style={styles.title}>
<AppText style={styles.title}>{t('Buyurtmalar soni')}</AppText>
<AppText style={styles.title}>
{selectedData ? '1' : data.data.length}
</Text>
</AppText>
</View>
<FlatList
@@ -262,7 +259,7 @@ const makeStyles = () =>
marginBottom: 12,
},
statusText: {
fontWeight: '600',
fontFamily: 'GolosText-Bold',
fontSize: 16,
},
infoCard: {

View File

@@ -1,10 +1,10 @@
import AppText from 'components/AppText';
import React, { useEffect, useRef } from 'react';
import { useTranslation } from 'react-i18next';
import {
Animated,
ScrollView,
StyleSheet,
Text,
TouchableOpacity,
View,
} from 'react-native';
@@ -68,7 +68,7 @@ const OrderDetailModal = ({ visible, setVisible, selectedOrder }: Props) => {
]}
>
<View style={styles.header}>
<Text style={styles.title}>{selectedOrder.packetName}</Text>
<AppText style={styles.title}>{selectedOrder.packetName}</AppText>
<TouchableOpacity onPress={closeModal} style={styles.closeBtn}>
<CloseIcon width={15} height={15} color={'#000'} />
</TouchableOpacity>
@@ -76,7 +76,7 @@ const OrderDetailModal = ({ visible, setVisible, selectedOrder }: Props) => {
<View style={styles.divider} />
<Text style={styles.sectionTitle}>{t('Mahsulotlar')}:</Text>
<AppText style={styles.sectionTitle}>{t('Mahsulotlar')}:</AppText>
<ScrollView
showsVerticalScrollIndicator={false}
style={{ maxHeight: 250 }}
@@ -89,23 +89,25 @@ const OrderDetailModal = ({ visible, setVisible, selectedOrder }: Props) => {
return (
<View key={product.trekId + index} style={styles.productItem}>
<View style={styles.row}>
<Text style={styles.productName}>{product.name}</Text>
<Text style={styles.productTrekId}>{t('Trek ID')}:</Text>
<AppText style={styles.productName}>{product.name}</AppText>
<AppText style={styles.productTrekId}>
{t('Trek ID')}:
</AppText>
</View>
<Text style={styles.productTrekId}>{product.trekId}</Text>
<AppText style={styles.productTrekId}>{product.trekId}</AppText>
<View style={styles.row}>
<Text style={styles.detail}>
<AppText style={styles.detail}>
{t('Ogirligi')}: {product.weight}
</Text>
<Text style={styles.detail}>
</AppText>
<AppText style={styles.detail}>
{t('Narxi')}: 1kg * {pricePerKg.toLocaleString('uz-UZ')}{' '}
{t("so'm")}
</Text>
</AppText>
</View>
<View style={styles.rowRight}>
<Text style={styles.total}>
<AppText style={styles.total}>
{t('Umumiy narxi')}: {product.totalPrice} {t('som')}
</Text>
</AppText>
</View>
</View>
);
@@ -113,12 +115,14 @@ const OrderDetailModal = ({ visible, setVisible, selectedOrder }: Props) => {
</ScrollView>
<View style={styles.totalRow}>
<Text style={styles.totalLabel}>{t('Umumiy narx')}:</Text>
<Text style={styles.totalValue}>{selectedOrder.totalPrice}</Text>
<AppText style={styles.totalLabel}>{t('Umumiy narx')}:</AppText>
<AppText style={styles.totalValue}>
{selectedOrder.totalPrice}
</AppText>
</View>
<TouchableOpacity onPress={closeModal} style={styles.btn}>
<Text style={styles.btnText}>{t('Yopish')}</Text>
<AppText style={styles.btnText}>{t('Yopish')}</AppText>
</TouchableOpacity>
</Animated.View>
</View>
@@ -144,7 +148,7 @@ const styles = StyleSheet.create({
},
total: {
fontSize: 14,
fontWeight: '600',
fontFamily: 'GolosText-Bold',
color: '#1D1D1D',
},
modalContent: {
@@ -165,7 +169,7 @@ const styles = StyleSheet.create({
},
title: {
fontSize: 18,
fontWeight: '600',
fontFamily: 'GolosText-Bold',
},
closeBtn: {
padding: 5,
@@ -183,7 +187,7 @@ const styles = StyleSheet.create({
},
sectionTitle: {
fontSize: 16,
fontWeight: '600',
fontFamily: 'GolosText-Bold',
paddingHorizontal: 20,
marginBottom: 8,
},
@@ -220,11 +224,11 @@ const styles = StyleSheet.create({
},
totalLabel: {
fontSize: 16,
fontWeight: '600',
fontFamily: 'GolosText-Bold',
},
totalValue: {
fontSize: 16,
fontWeight: '600',
fontFamily: 'GolosText-Bold',
color: '#28A7E8',
},
btn: {
@@ -240,7 +244,7 @@ const styles = StyleSheet.create({
textAlign: 'center',
color: '#fff',
fontSize: 16,
fontWeight: '600',
fontFamily: 'GolosText-Bold',
},
});

View File

@@ -1,3 +1,4 @@
import AppText from 'components/AppText';
import React, { Dispatch, SetStateAction, useRef, useState } from 'react';
import { useTranslation } from 'react-i18next';
import {
@@ -5,7 +6,6 @@ import {
NativeScrollEvent,
NativeSyntheticEvent,
StyleSheet,
Text,
TouchableOpacity,
View,
useWindowDimensions,
@@ -79,11 +79,11 @@ const Tabs = ({ filter, setFilter }: Props) => {
style={[styles.card, filter === item.value && styles.activeCard]}
onPress={() => setFilter(item.value)}
>
<Text
<AppText
style={[styles.text, filter === item.value && styles.activeText]}
>
{t(item.label)}
</Text>
</AppText>
</TouchableOpacity>
)}
contentContainerStyle={styles.scrollContent}

View File

@@ -1,5 +1,6 @@
import { zodResolver } from '@hookform/resolvers/zod';
import { RouteProp, useRoute } from '@react-navigation/native';
import AppText from 'components/AppText';
import NavbarBack from 'components/NavbarBack';
import Navigation from 'components/Navigation';
import * as React from 'react';
@@ -11,7 +12,6 @@ import {
Linking,
Platform,
ScrollView,
Text,
TextInput,
TouchableOpacity,
View,
@@ -110,7 +110,9 @@ const EnterCard = (props: EnterCardProps) => {
name="card_name"
render={({ field: { onChange, value } }) => (
<View>
<Text style={PaymentStyle.label}>{t('Karta nomi')}</Text>
<AppText style={PaymentStyle.label}>
{t('Karta nomi')}
</AppText>
<TextInput
style={PaymentStyle.input}
placeholder={t('Karta nomi')}
@@ -119,9 +121,9 @@ const EnterCard = (props: EnterCardProps) => {
value={value}
/>
{errors.card_name && (
<Text style={PaymentStyle.errorText}>
<AppText style={PaymentStyle.errorText}>
{t(errors.card_name.message || '')}
</Text>
</AppText>
)}
</View>
)}
@@ -137,12 +139,12 @@ const EnterCard = (props: EnterCardProps) => {
return (
<View>
<Text style={PaymentStyle.label}>
<AppText style={PaymentStyle.label}>
{t('Karta raqami')}
</Text>
</AppText>
<View style={{ position: 'relative' }}>
{/* Ghost text with value + remaining */}
<Text
<AppText
style={[
PaymentStyle.input,
{
@@ -160,11 +162,11 @@ const EnterCard = (props: EnterCardProps) => {
},
]}
>
<Text style={{ color: '#000' }}>
<AppText style={{ color: '#000' }}>
{formattedValue}
</Text>
<Text>{ghostRemaining}</Text>
</Text>
</AppText>
<AppText>{ghostRemaining}</AppText>
</AppText>
<MaskInput
value={value}
onChangeText={masked => {
@@ -206,9 +208,9 @@ const EnterCard = (props: EnterCardProps) => {
/>
</View>
{errors.card_number && (
<Text style={PaymentStyle.errorText}>
<AppText style={PaymentStyle.errorText}>
{t(errors.card_number.message || '')}
</Text>
</AppText>
)}
</View>
);
@@ -235,7 +237,9 @@ const EnterCard = (props: EnterCardProps) => {
return (
<View>
<Text style={PaymentStyle.label}>{t('Muddati')}</Text>
<AppText style={PaymentStyle.label}>
{t('Muddati')}
</AppText>
<TextInput
style={PaymentStyle.input}
placeholder="MM/YY"
@@ -246,9 +250,9 @@ const EnterCard = (props: EnterCardProps) => {
maxLength={5}
/>
{errors.duration && (
<Text style={PaymentStyle.errorText}>
<AppText style={PaymentStyle.errorText}>
{t(errors.duration.message || '')}
</Text>
</AppText>
)}
</View>
);
@@ -264,9 +268,9 @@ const EnterCard = (props: EnterCardProps) => {
marginTop: 20,
}}
>
<Text>
<AppText>
{selectedId?.toUpperCase()} {t("ilovasi orqali to'lash")}
</Text>
</AppText>
</TouchableOpacity>
</ScrollView>
</KeyboardAvoidingView>
@@ -294,7 +298,7 @@ const EnterCard = (props: EnterCardProps) => {
{load ? (
<ActivityIndicator size="small" color="#fff" />
) : (
<Text style={PaymentStyle.btnText}>{t("To'lash")}</Text>
<AppText style={PaymentStyle.btnText}>{t("To'lash")}</AppText>
)}
</TouchableOpacity>
<Navigation />

View File

@@ -1,9 +1,10 @@
import { useNavigation } from '@react-navigation/native';
import { NativeStackNavigationProp } from '@react-navigation/native-stack';
import { PacketsData } from 'api/packets';
import AppText from 'components/AppText';
import React, { useCallback, useMemo } from 'react';
import { useTranslation } from 'react-i18next';
import { Text, TouchableOpacity, View } from 'react-native';
import { TouchableOpacity, View } from 'react-native';
import { PaymentStyle } from './style';
type WalletStackParamList = {
@@ -66,39 +67,43 @@ const Payment = ({ packets }: Props) => {
<View style={cardContainerStyle}>
<View style={cardStyle}>
<View style={PaymentStyle.cardHeader}>
<Text style={PaymentStyle.title}>{item.packetName}</Text>
<AppText style={PaymentStyle.title}>{item.packetName}</AppText>
{isPaid ? (
<Text style={PaymentStyle.badge}>{t("To'langan")}</Text>
<AppText style={PaymentStyle.badge}>{t("To'langan")}</AppText>
) : (
<Text style={badgeStyle}>{t("To'lanmagan")}</Text>
<AppText style={badgeStyle}>{t("To'lanmagan")}</AppText>
)}
</View>
<View style={PaymentStyle.row}>
<Text style={PaymentStyle.infoTitle}>{t('Reys raqami')}</Text>
<Text
<AppText style={PaymentStyle.infoTitle}>
{t('Reys raqami')}
</AppText>
<AppText
style={[
PaymentStyle.text,
{ width: '60%', textAlign: 'right' },
]}
>
{item.packetName}
</Text>
</AppText>
</View>
<View style={PaymentStyle.row}>
<Text style={PaymentStyle.infoTitle}>
<AppText style={PaymentStyle.infoTitle}>
{t("Mahsulotlar og'irligi")}
</Text>
<Text style={PaymentStyle.text}>{item.weight}</Text>
</AppText>
<AppText style={PaymentStyle.text}>{item.weight}</AppText>
</View>
<View style={PaymentStyle.row}>
<Text style={PaymentStyle.infoTitle}>
<AppText style={PaymentStyle.infoTitle}>
{t('Mahsulotlar soni')}
</Text>
<Text style={PaymentStyle.text}>{item.items.length}</Text>
</AppText>
<AppText style={PaymentStyle.text}>{item.items.length}</AppText>
</View>
<View style={PaymentStyle.row}>
<Text style={PaymentStyle.infoTitle}>{t('Umumiy narxi')}</Text>
<Text style={PaymentStyle.text}>{item.totalPrice}</Text>
<AppText style={PaymentStyle.infoTitle}>
{t('Umumiy narxi')}
</AppText>
<AppText style={PaymentStyle.text}>{item.totalPrice}</AppText>
</View>
</View>
</View>

View File

@@ -1,5 +1,6 @@
import { useQuery } from '@tanstack/react-query';
import packetsApi from 'api/packets';
import AppText from 'components/AppText';
import Layout from 'components/Layout';
import LoadingScreen from 'components/LoadingScreen';
import NoResult from 'components/NoResult';
@@ -10,7 +11,6 @@ import {
RefreshControl,
ScrollView,
StyleSheet,
Text,
TouchableOpacity,
View,
} from 'react-native';
@@ -74,14 +74,17 @@ const Wallet = () => {
loadInitialData();
}, []);
useEffect(() => {
setPageAvia(0);
}, [selectedType]);
const onRefresh = useCallback(async () => {
try {
setRefreshing(true);
await refetch();
await refetchAvia();
} catch (error) {
console.error('Refresh error:', error);
} finally {
setRefreshing(false);
}
}, [refetch]);
@@ -126,7 +129,7 @@ const Wallet = () => {
>
<View style={styles.container}>
<View style={styles.header}>
<Text style={styles.title}>{t("To'lov")}</Text>
<AppText style={styles.title}>{t("To'lov")}</AppText>
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
<TouchableOpacity
style={{
@@ -137,14 +140,14 @@ const Wallet = () => {
}}
onPress={() => setSelectedType('AVIA')}
>
<Text
<AppText
style={{
color: '#28A7E8',
fontSize: 14,
}}
>
AVIA
</Text>
</AppText>
</TouchableOpacity>
<View style={{ width: 1 }} />
<TouchableOpacity
@@ -157,7 +160,7 @@ const Wallet = () => {
}}
onPress={() => setSelectedType('AUTO')}
>
<Text
<AppText
style={{
color: selectedType === 'AUTO' ? '#fff' : '#28A7E8',
fontSize: 14,
@@ -165,7 +168,7 @@ const Wallet = () => {
}}
>
AUTO
</Text>
</AppText>
</TouchableOpacity>
</View>
</View>
@@ -191,7 +194,7 @@ const Wallet = () => {
>
<View style={styles.container}>
<View style={styles.header}>
<Text style={styles.title}>{t("To'lov")}</Text>
<AppText style={styles.title}>{t("To'lov")}</AppText>
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
<TouchableOpacity
style={{
@@ -203,14 +206,14 @@ const Wallet = () => {
}}
onPress={() => setSelectedType('AVIA')}
>
<Text
<AppText
style={{
color: selectedType === 'AVIA' ? '#fff' : '#28A7E8',
fontSize: 14,
}}
>
AVIA
</Text>
</AppText>
</TouchableOpacity>
<View style={{ width: 1 }} />
<TouchableOpacity
@@ -222,7 +225,7 @@ const Wallet = () => {
}}
onPress={() => setSelectedType('AUTO')}
>
<Text
<AppText
style={{
color: '#28A7E8',
fontSize: 14,
@@ -230,7 +233,7 @@ const Wallet = () => {
}}
>
AUTO
</Text>
</AppText>
</TouchableOpacity>
</View>
</View>
@@ -253,7 +256,7 @@ const Wallet = () => {
<View style={{ flex: 1, justifyContent: 'space-between' }}>
<View>
<View style={styles.header}>
<Text style={styles.title}>{t("To'lov")}</Text>
<AppText style={styles.title}>{t("To'lov")}</AppText>
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
<TouchableOpacity
style={{
@@ -265,14 +268,14 @@ const Wallet = () => {
}}
onPress={() => setSelectedType('AVIA')}
>
<Text
<AppText
style={{
color: selectedType === 'AVIA' ? '#fff' : '#28A7E8',
fontSize: 14,
}}
>
AVIA
</Text>
</AppText>
</TouchableOpacity>
<View style={{ width: 1 }} />
<TouchableOpacity
@@ -285,7 +288,7 @@ const Wallet = () => {
}}
onPress={() => setSelectedType('AUTO')}
>
<Text
<AppText
style={{
color: selectedType === 'AUTO' ? '#fff' : '#28A7E8',
fontSize: 14,
@@ -293,7 +296,7 @@ const Wallet = () => {
}}
>
AUTO
</Text>
</AppText>
</TouchableOpacity>
</View>
</View>

View File

@@ -23,7 +23,7 @@ export const PaymentStyle = StyleSheet.create({
title: {
width: '60%',
fontSize: 18,
fontWeight: '600',
fontFamily: 'GolosText-Bold',
},
badge: {
backgroundColor: '#4CAF50',
@@ -141,7 +141,7 @@ export const PaymentStyle = StyleSheet.create({
itemName: {
fontSize: 17,
fontWeight: '600',
fontFamily: 'GolosText-Bold',
color: '#333',
},
@@ -153,6 +153,8 @@ export const PaymentStyle = StyleSheet.create({
track: {
fontSize: 15,
color: '#666',
textAlign: 'right',
marginTop: 2,
},
price: {
@@ -163,7 +165,7 @@ export const PaymentStyle = StyleSheet.create({
total: {
fontSize: 16,
fontWeight: '600',
fontFamily: 'GolosText-Bold',
color: '#1D1D1D',
},

View File

@@ -1,6 +1,7 @@
import { NativeStackNavigationProp } from '@react-navigation/native-stack';
import { useMutation } from '@tanstack/react-query';
import packetsApi from 'api/packets';
import AppText from 'components/AppText';
import React, { useEffect, useRef, useState } from 'react';
import { useTranslation } from 'react-i18next';
import {
@@ -9,7 +10,6 @@ import {
Dimensions,
Linking,
StyleSheet,
Text,
TouchableOpacity,
TouchableWithoutFeedback,
View,
@@ -195,7 +195,7 @@ const ModalCard = ({
{load || isPending ? (
<ActivityIndicator size="small" color="#fff" />
) : (
<Text
<AppText
style={[
PaymentStyle.btnText,
{
@@ -204,7 +204,7 @@ const ModalCard = ({
]}
>
{t("To'lash")}
</Text>
</AppText>
)}
</TouchableOpacity>
</View>

View File

@@ -1,5 +1,6 @@
import { useMutation } from '@tanstack/react-query';
import packetsApi from 'api/packets';
import AppText from 'components/AppText';
import React, { useEffect, useRef } from 'react';
import { useTranslation } from 'react-i18next';
import {
@@ -7,7 +8,6 @@ import {
Animated,
Dimensions,
StyleSheet,
Text,
TouchableOpacity,
TouchableWithoutFeedback,
View,
@@ -152,14 +152,14 @@ const ModalPay = ({
width={28}
height={28}
/>
<Text
<AppText
style={[
PaymentStyle.titleMethod,
{ color: selectedId == 'card' ? '#28A7E8' : '#000' },
]}
>
{t('Bank kartasi')}
</Text>
</AppText>
</View>
<View
style={[
@@ -196,14 +196,14 @@ const ModalPay = ({
height={28}
colorCircle={selectedId == 'pay' ? '#28A7E8' : '#000000'}
/>
<Text
<AppText
style={[
PaymentStyle.titleMethod,
{ color: selectedId == 'pay' ? '#28A7E8' : '#000' },
]}
>
{t('Naqt pul')}
</Text>
</AppText>
</View>
<View
style={[
@@ -235,7 +235,7 @@ const ModalPay = ({
{load ? (
<ActivityIndicator size="small" color="#fff" />
) : (
<Text
<AppText
style={[
PaymentStyle.btnText,
{
@@ -245,7 +245,7 @@ const ModalPay = ({
]}
>
{t("To'lash")}
</Text>
</AppText>
)}
</TouchableOpacity>
</Animated.View>

View File

@@ -1,12 +1,12 @@
import { useNavigation } from '@react-navigation/native';
import { NativeStackNavigationProp } from '@react-navigation/native-stack';
import AppText from 'components/AppText';
import LottieView from 'lottie-react-native';
import React, { useEffect, useRef, useState } from 'react';
import { useTranslation } from 'react-i18next';
import {
Animated,
StyleSheet,
Text,
TouchableOpacity,
useWindowDimensions,
View,
@@ -89,11 +89,11 @@ const ModalSuccess = ({
]}
>
<View style={styles.header}>
<Text style={styles.title}>
<AppText style={styles.title}>
{successMet
? t('Tolov muvaffaqqiyatli otdi')
: t('Chop etilmoqda')}
</Text>
</AppText>
<TouchableOpacity
onPress={closeModal}
style={styles.closeBtn}
@@ -135,11 +135,11 @@ const ModalSuccess = ({
style={{ width: 100 * scale, height: 100 * scale }}
/>
)}
<Text style={styles.status}>
<AppText style={styles.status}>
{successMet
? t('Toʻlovingiz tasdiqlandi!')
: t('Iltimos ozroq kutib turing!')}
</Text>
</AppText>
</View>
{successMet && (
@@ -149,11 +149,11 @@ const ModalSuccess = ({
style={styles.btn}
onPress={() => setPayModal(false)}
>
<Text style={styles.btnText}>{t('Yaxshi')}</Text>
<AppText style={styles.btnText}>{t('Yaxshi')}</AppText>
</TouchableOpacity>
) : (
<TouchableOpacity style={styles.btn} onPress={closeModal}>
<Text style={styles.btnText}>{t('Yaxshi')}</Text>
<AppText style={styles.btnText}>{t('Yaxshi')}</AppText>
</TouchableOpacity>
)}
</>

View File

@@ -1,8 +1,9 @@
import { RouteProp, useRoute } from '@react-navigation/native';
import AppText from 'components/AppText';
import LayoutTwo from 'components/LayoutTwo';
import * as React from 'react';
import { useTranslation } from 'react-i18next';
import { Text, TouchableOpacity } from 'react-native';
import { TouchableOpacity } from 'react-native';
import { useSafeAreaInsets } from 'react-native-safe-area-context';
import { PaymentStyle } from '../../payment/ui/style';
import ModalCard from './ModalCard';
@@ -74,7 +75,7 @@ const PaymentMethod = () => {
style={[PaymentStyle.button, { bottom: bottom + 80 }]}
onPress={toggleModal}
>
<Text style={PaymentStyle.btnText}>{t("To'lash")}</Text>
<AppText style={PaymentStyle.btnText}>{t("To'lash")}</AppText>
</TouchableOpacity>
</LayoutTwo>
);

View File

@@ -1,8 +1,9 @@
import { useQuery } from '@tanstack/react-query';
import exchanges_api from 'api/exchanges';
import AppText from 'components/AppText';
import * as React from 'react';
import { useTranslation } from 'react-i18next';
import { Dimensions, ScrollView, Text, View } from 'react-native';
import { Dimensions, ScrollView, View } from 'react-native';
import Svg, { Circle, Path } from 'react-native-svg';
import Plane from 'svg/Plane';
import { PaymentStyle } from '../../payment/ui/style';
@@ -61,8 +62,12 @@ const PaymentProduct = ({ packet }: PaymentProductProps) => {
>
{data && (
<>
<Text style={PaymentStyle.titleMethod}>{data[0].code}</Text>
<Text style={PaymentStyle.textMethod}>{data[0].rate} UZS</Text>
<AppText style={PaymentStyle.titleMethod}>
{data[0].code}
</AppText>
<AppText style={PaymentStyle.textMethod}>
{data[0].rate} UZS
</AppText>
</>
)}
</View>
@@ -75,8 +80,8 @@ const PaymentProduct = ({ packet }: PaymentProductProps) => {
: { flexBasis: '48%', alignItems: 'flex-end' },
]}
>
<Text style={PaymentStyle.titleMethod}>Cargo</Text>
<Text style={PaymentStyle.textMethod}>12.267 UZS/ kg</Text>
<AppText style={PaymentStyle.titleMethod}>Cargo</AppText>
<AppText style={PaymentStyle.textMethod}>12.267 UZS/ kg</AppText>
</View>
{/* <View
@@ -87,8 +92,8 @@ const PaymentProduct = ({ packet }: PaymentProductProps) => {
: { flexBasis: '48%', alignItems: 'flex-start' },
]}
>
<Text style={PaymentStyle.titleMethod}>{t('Yetkazish vaqti')}</Text>
<Text style={PaymentStyle.textMethod}>08.25.2025</Text>
<AppText style={PaymentStyle.titleMethod}>{t('Yetkazish vaqti')}</AppText>
<AppText style={PaymentStyle.textMethod}>08.25.2025</AppText>
</View> */}
<View
@@ -99,10 +104,10 @@ const PaymentProduct = ({ packet }: PaymentProductProps) => {
: { flexBasis: '48%', alignItems: 'flex-start' },
]}
>
<Text style={PaymentStyle.titleMethod}>Reys</Text>
<Text style={[PaymentStyle.textMethod, { textAlign: 'left' }]}>
<AppText style={PaymentStyle.titleMethod}>Reys</AppText>
<AppText style={[PaymentStyle.textMethod, { textAlign: 'left' }]}>
{packet.packetName}
</Text>
</AppText>
</View>
</View>
<View
@@ -155,23 +160,23 @@ const PaymentProduct = ({ packet }: PaymentProductProps) => {
<View key={index} style={{ marginBottom: 15 }}>
<View style={PaymentStyle.receiptCard}>
<View style={PaymentStyle.rowBetween}>
<Text style={PaymentStyle.itemName}>{item.name}</Text>
<Text style={PaymentStyle.track}>
<AppText style={PaymentStyle.itemName}>{item.name}</AppText>
<AppText style={PaymentStyle.track}>
{t('Trek ID')}: {item.trackId}
</Text>
</AppText>
</View>
<View style={PaymentStyle.rowBetween}>
<Text style={PaymentStyle.weight}>
<AppText style={PaymentStyle.weight}>
{t('Ogirligi')}: {weight} kg
</Text>
<Text style={PaymentStyle.price}>
</AppText>
<AppText style={PaymentStyle.price}>
1kg * {formattedPrice} {t('som')}
</Text>
</AppText>
</View>
<View style={PaymentStyle.rowRight}>
<Text style={PaymentStyle.total}>
<AppText style={PaymentStyle.total}>
{t('Umumiy narxi')}: {formattedTotal} {t('som')}
</Text>
</AppText>
</View>
</View>
</View>
@@ -186,7 +191,9 @@ const PaymentProduct = ({ packet }: PaymentProductProps) => {
: { flexBasis: '48%', alignItems: 'flex-start' },
]}
>
<Text style={PaymentStyle.titleMethod}>{t('Umumiy narxi')}</Text>
<AppText style={PaymentStyle.titleMethod}>
{t('Umumiy narxi')}
</AppText>
</View>
<View
@@ -197,7 +204,9 @@ const PaymentProduct = ({ packet }: PaymentProductProps) => {
: { flexBasis: '48%', alignItems: 'flex-end' },
]}
>
<Text style={PaymentStyle.titleMethod}>{packet.totalPrice}</Text>
<AppText style={PaymentStyle.titleMethod}>
{packet.totalPrice}
</AppText>
</View>
</View>
</View>

View File

@@ -1,6 +1,7 @@
import { RouteProp, useRoute } from '@react-navigation/native';
import { useQuery } from '@tanstack/react-query';
import exchanges_api from 'api/exchanges';
import AppText from 'components/AppText';
import LayoutTwo from 'components/LayoutTwo';
import * as React from 'react';
import { useTranslation } from 'react-i18next';
@@ -9,7 +10,6 @@ import {
Image,
ScrollView,
StyleSheet,
Text,
TouchableOpacity,
View,
} from 'react-native';
@@ -92,10 +92,12 @@ const PaymentQrCode = () => {
>
{data && (
<>
<Text style={PaymentStyle.titleMethod}>{data[0].code}</Text>
<Text style={PaymentStyle.textMethod}>
<AppText style={PaymentStyle.titleMethod}>
{data[0].code}
</AppText>
<AppText style={PaymentStyle.textMethod}>
{data[0].rate} UZS
</Text>
</AppText>
</>
)}
</View>
@@ -108,8 +110,8 @@ const PaymentQrCode = () => {
: { flexBasis: '48%', alignItems: 'flex-end' },
]}
>
<Text style={PaymentStyle.titleMethod}>Cargo</Text>
<Text style={PaymentStyle.textMethod}>12.267 UZS/ kg</Text>
<AppText style={PaymentStyle.titleMethod}>Cargo</AppText>
<AppText style={PaymentStyle.textMethod}>12.267 UZS/ kg</AppText>
</View>
{/* <View
@@ -120,10 +122,10 @@ const PaymentQrCode = () => {
: { flexBasis: '48%', alignItems: 'flex-start' },
]}
>
<Text style={PaymentStyle.titleMethod}>
<AppText style={PaymentStyle.titleMethod}>
{t('Yetkazish vaqti')}
</Text>
<Text style={PaymentStyle.textMethod}>{}</Text>
</AppText>
<AppText style={PaymentStyle.textMethod}>{}</AppText>
</View> */}
<View
@@ -134,10 +136,10 @@ const PaymentQrCode = () => {
: { flexBasis: '48%', alignItems: 'flex-start' },
]}
>
<Text style={PaymentStyle.titleMethod}>Reys</Text>
<Text style={[PaymentStyle.textMethod, { textAlign: 'left' }]}>
<AppText style={PaymentStyle.titleMethod}>Reys</AppText>
<AppText style={[PaymentStyle.textMethod, { textAlign: 'left' }]}>
{packets.packetName}
</Text>
</AppText>
</View>
</View>
<View
@@ -182,21 +184,25 @@ const PaymentQrCode = () => {
<View key={index} style={{ marginBottom: 15 }}>
<View style={PaymentStyle.receiptCard}>
<View style={PaymentStyle.rowBetween}>
<Text style={PaymentStyle.itemName}>{item.name}</Text>
<Text style={PaymentStyle.track}>
{t('Trek ID')}: {item.trackId}
</Text>
<View style={{ width: '100%' }}>
<AppText style={PaymentStyle.itemName}>{item.name}</AppText>
<AppText style={PaymentStyle.track}>
{t('Trek ID')}: {item.trekId}
</AppText>
</View>
</View>
<View style={PaymentStyle.rowBetween}>
<Text style={PaymentStyle.weight}>
<AppText style={PaymentStyle.weight}>
{t('Ogirligi')}: {item.weight}
</Text>
<Text style={PaymentStyle.price}>1kg * {item.unitPrice}</Text>
</AppText>
<AppText style={PaymentStyle.price}>
1kg * {item.price}
</AppText>
</View>
<View style={PaymentStyle.rowRight}>
<Text style={PaymentStyle.total}>
{t('Umumiy narxi')}: {item.total} {t('som')}
</Text>
<AppText style={PaymentStyle.total}>
{t('Umumiy narxi')}: {item.totalPrice} {t('som')}
</AppText>
</View>
</View>
<Svg height="1" width={svgWidthProduct}>
@@ -219,7 +225,9 @@ const PaymentQrCode = () => {
: { flexBasis: '48%', alignItems: 'flex-start' },
]}
>
<Text style={PaymentStyle.titleMethod}>{t('Umumiy narxi')}</Text>
<AppText style={PaymentStyle.titleMethod}>
{t('Umumiy narxi')}
</AppText>
</View>
<View
@@ -230,7 +238,9 @@ const PaymentQrCode = () => {
: { flexBasis: '48%', alignItems: 'flex-end' },
]}
>
<Text style={PaymentStyle.titleMethod}>100.000.000</Text>
<AppText style={PaymentStyle.titleMethod}>
{packets.totalPrice}
</AppText>
</View>
<View
style={{ alignItems: 'center', marginTop: 10, margin: 'auto' }}
@@ -334,7 +344,7 @@ const PaymentQrCode = () => {
style={[PaymentStyle.button, { bottom: bottom + 80 }]}
onPress={toggleModal}
>
<Text style={PaymentStyle.btnText}>{t("To'lash")}</Text>
<AppText style={PaymentStyle.btnText}>{t("To'lash")}</AppText>
</TouchableOpacity>
)}
</LayoutTwo>

View File

@@ -1,8 +1,8 @@
import AppText from 'components/AppText';
import React from 'react';
import {
Image,
StyleSheet,
Text,
TouchableOpacity,
View,
useWindowDimensions,
@@ -69,10 +69,12 @@ const FirstStep = ({
},
]}
>
<Text style={[styles.title, { fontSize: screenWidth * 0.075 * scale }]}>
<AppText
style={[styles.title, { fontSize: screenWidth * 0.075 * scale }]}
>
{texts[lang].title}
</Text>
<Text
</AppText>
<AppText
style={[
styles.text,
{ fontSize: screenWidth * 0.04 * scale, marginTop: 8 * scale },
@@ -81,7 +83,7 @@ const FirstStep = ({
ellipsizeMode="tail"
>
{texts[lang].description}
</Text>
</AppText>
</View>
<View

View File

@@ -1,8 +1,8 @@
import AppText from 'components/AppText';
import React from 'react';
import {
Image,
StyleSheet,
Text,
TouchableOpacity,
View,
useWindowDimensions,
@@ -68,17 +68,19 @@ const SecondStep = ({
},
]}
>
<Text style={[styles.title, { fontSize: screenWidth * 0.075 * scale }]}>
<AppText
style={[styles.title, { fontSize: screenWidth * 0.075 * scale }]}
>
{texts[lang].title}
</Text>
<Text
</AppText>
<AppText
style={[
styles.text,
{ fontSize: screenWidth * 0.04 * scale, marginTop: 10 * scale },
]}
>
{texts[lang].description}
</Text>
</AppText>
</View>
<View

View File

@@ -1,10 +1,10 @@
import { NativeStackNavigationProp } from '@react-navigation/native-stack';
import AppText from 'components/AppText';
import React from 'react';
import {
Image,
ScrollView,
StyleSheet,
Text,
TouchableOpacity,
useWindowDimensions,
View,
@@ -44,15 +44,17 @@ const SelectLangPage = ({
},
]}
/>
<Text style={[styles.logoText, { fontSize: 24 }]}>CPOST</Text>
<AppText style={[styles.logoText, { fontSize: 24 }]}>
CPOST
</AppText>
</View>
<Text style={[styles.title, { fontSize: 24 }]}>
<AppText style={[styles.title, { fontSize: 24 }]}>
Tilni tanlang{' '}
<Text style={[styles.title, { fontSize: 18 }]}>
<AppText style={[styles.title, { fontSize: 18 }]}>
(Выберите язык)
</Text>
</Text>
</AppText>
</AppText>
<View style={styles.btnContainer}>
<TouchableOpacity
@@ -60,7 +62,7 @@ const SelectLangPage = ({
style={styles.button}
>
<Image source={UZ} style={styles.flag} />
<Text style={styles.btnText}>O'zbek tili</Text>
<AppText style={styles.btnText}>O'zbek tili</AppText>
</TouchableOpacity>
<TouchableOpacity
@@ -68,7 +70,7 @@ const SelectLangPage = ({
style={styles.button}
>
<Image source={RU} style={styles.flag} />
<Text style={styles.btnText}>Русский язык</Text>
<AppText style={styles.btnText}>Русский язык</AppText>
</TouchableOpacity>
</View>
</View>

View File

@@ -1,8 +1,8 @@
import AppText from 'components/AppText';
import React from 'react';
import {
Image,
StyleSheet,
Text,
TouchableOpacity,
View,
useWindowDimensions,
@@ -70,17 +70,19 @@ const ThirdStep = ({
},
]}
>
<Text style={[styles.title, { fontSize: screenWidth * 0.075 * scale }]}>
<AppText
style={[styles.title, { fontSize: screenWidth * 0.075 * scale }]}
>
{texts[lang].title}
</Text>
<Text
</AppText>
<AppText
style={[
styles.text,
{ fontSize: screenWidth * 0.04 * scale, marginTop: 10 * scale },
]}
>
{texts[lang].description}
</Text>
</AppText>
</View>
<View

View File

@@ -1,5 +1,5 @@
import { initializeApp } from 'firebase/app';
import { getMessaging } from 'firebase/messaging';
import { initializeApp } from '@react-native-firebase/app';
import { getMessaging } from '@react-native-firebase/messaging';
const firebaseConfig = {
apiKey: 'AIzaSyBEwWi1TuZBNj2hkFGGIaWZNNDCoiC__lE',
@@ -11,4 +11,4 @@ const firebaseConfig = {
};
export const firebaseApp = initializeApp(firebaseConfig);
export const messaging = getMessaging(firebaseApp);
export const messaging = getMessaging(await firebaseApp);