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

View File

@@ -1,7 +1,6 @@
apply plugin: "com.android.application" apply plugin: "com.android.application"
apply plugin: "org.jetbrains.kotlin.android" apply plugin: "org.jetbrains.kotlin.android"
apply plugin: "com.facebook.react" 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. * This is the configuration block to customize your React Native Android app.
@@ -86,8 +85,8 @@ android {
applicationId "uz.felix.cpost" applicationId "uz.felix.cpost"
minSdkVersion rootProject.ext.minSdkVersion minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 3 versionCode 4
versionName "0.3" versionName "0.4"
multiDexEnabled true multiDexEnabled true
vectorDrawables.useSupportLibrary = 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', 'Matn yoq',
android: { android: {
channelId, channelId,
smallIcon: 'ic_launcher', largeIcon: 'ic_launcher_foreground',
sound: 'default', sound: 'default',
pressAction: { pressAction: {
id: 'default', id: 'default',

View File

@@ -12,6 +12,12 @@
761780ED2CA45674006654EE /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 761780EC2CA45674006654EE /* AppDelegate.swift */; }; 761780ED2CA45674006654EE /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 761780EC2CA45674006654EE /* AppDelegate.swift */; };
81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; }; 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; };
CEF180279D89A214CE1D1A56 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */; }; 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 */ /* End PBXBuildFile section */
/* Begin PBXFileReference 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>"; }; 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>"; }; 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; }; 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 */ /* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */ /* Begin PBXFrameworksBuildPhase section */
@@ -75,6 +87,7 @@
83CBBA001A601CBA00E9B192 /* Products */, 83CBBA001A601CBA00E9B192 /* Products */,
2D16E6871FA4F8E400B85C8A /* Frameworks */, 2D16E6871FA4F8E400B85C8A /* Frameworks */,
BBD78D7AC51CEA395F1C20DB /* Pods */, BBD78D7AC51CEA395F1C20DB /* Pods */,
9B5408F660B24B4A8E6C28A9 /* Resources */,
); );
indentWidth = 2; indentWidth = 2;
sourceTree = "<group>"; sourceTree = "<group>";
@@ -98,6 +111,20 @@
path = Pods; path = Pods;
sourceTree = "<group>"; 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 */ /* End PBXGroup section */
/* Begin PBXNativeTarget section */ /* Begin PBXNativeTarget section */
@@ -161,6 +188,12 @@
81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */, 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */,
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
CEF180279D89A214CE1D1A56 /* PrivacyInfo.xcprivacy 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; runOnlyForDeploymentPostprocessing = 0;
}; };

View File

@@ -59,5 +59,14 @@
</array> </array>
<key>UIViewControllerBasedStatusBarAppearance</key> <key>UIViewControllerBasedStatusBarAppearance</key>
<false/> <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> </dict>
</plist> </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-async-storage/async-storage": "^2.2.0",
"@react-native-clipboard/clipboard": "^1.16.3", "@react-native-clipboard/clipboard": "^1.16.3",
"@react-native-community/datetimepicker": "^8.4.2", "@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/app": "^23.2.0",
"@react-native-firebase/messaging": "^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": "^7.1.17",
"@react-navigation/native-stack": "^7.3.25", "@react-navigation/native-stack": "^7.3.25",
"@shopify/react-native-skia": "^2.2.2",
"@tanstack/react-query": "^5.84.2", "@tanstack/react-query": "^5.84.2",
"axios": "^1.11.0", "axios": "^1.11.0",
"date-fns": "^4.1.0",
"i18next": "^25.3.2", "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", "lottie-react-native": "^7.3.0",
"react": "19.1.0", "react": "19.1.0",
"react-hook-form": "^7.61.1", "react-hook-form": "^7.61.1",
"react-i18next": "^15.6.1", "react-i18next": "^15.6.1",
"react-native": "^0.80.1", "react-native": "^0.80.1",
"react-native-app-link": "^1.0.1", "react-native-app-link": "^1.0.1",
"react-native-asset": "^2.1.1",
"react-native-biometrics": "^3.0.1", "react-native-biometrics": "^3.0.1",
"react-native-config": "^1.5.6", "react-native-config": "^1.5.6",
"react-native-confirmation-code-field": "^8.0.1", "react-native-confirmation-code-field": "^8.0.1",
"react-native-device-info": "^14.0.4", "react-native-device-info": "^14.0.4",
"react-native-dotenv": "^3.4.11", "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-gesture-password": "^0.4.0",
"react-native-haptic-feedback": "^2.3.3",
"react-native-image-crop-picker": "^0.50.1", "react-native-image-crop-picker": "^0.50.1",
"react-native-image-picker": "^8.2.1", "react-native-image-picker": "^8.2.1",
"react-native-keychain": "^10.0.0",
"react-native-linear-gradient": "^2.8.3", "react-native-linear-gradient": "^2.8.3",
"react-native-localize": "^3.5.1", "react-native-localize": "^3.5.1",
"react-native-maps": "^1.25.0",
"react-native-mask-input": "^1.2.3", "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": "^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-push-notification": "^8.1.1",
"react-native-reanimated": "^4.0.2", "react-native-reanimated": "^4.0.2",
"react-native-reanimated-carousel": "^4.0.2",
"react-native-safe-area-context": "^5.6.0", "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-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-smooth-pincode-input": "^1.0.9",
"react-native-splash-screen": "^3.3.0",
"react-native-svg": "^15.12.1", "react-native-svg": "^15.12.1",
"react-native-toast-message": "^2.3.3", "react-native-toast-message": "^2.3.3",
"react-native-vector-icons": "^10.3.0",
"react-native-webview": "^13.15.0", "react-native-webview": "^13.15.0",
"react-native-worklets": "^0.4.1", "react-native-worklets": "0.4.1",
"zod": "^4.0.10", "zod": "^4.0.10",
"zustand": "^5.0.6" "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 React, { useCallback, useEffect, useMemo, useRef } from 'react';
import { View, Animated, StyleSheet } from "react-native" import { Animated, StyleSheet, View } from 'react-native';
const AnimatedDots = () => { const AnimatedDots = () => {
const dot1 = useRef(new Animated.Value(0)).current const dot1 = useRef(new Animated.Value(0)).current;
const dot2 = useRef(new Animated.Value(0)).current const dot2 = useRef(new Animated.Value(0)).current;
const dot3 = useRef(new Animated.Value(0)).current const dot3 = useRef(new Animated.Value(0)).current;
const animationConfig = useMemo(() => ({ const animationConfig = useMemo(
() => ({
duration: 300, duration: 300,
useNativeDriver: true, useNativeDriver: true,
}), []); }),
[],
);
const createTimingAnimation = useCallback((value: Animated.Value, toValue: number) => { const createTimingAnimation = useCallback(
(value: Animated.Value, toValue: number) => {
return Animated.timing(value, { return Animated.timing(value, {
toValue, toValue,
...animationConfig, ...animationConfig,
}); });
}, [animationConfig]); },
[animationConfig],
);
const animationSequence = useMemo(() => { const animationSequence = useMemo(() => {
return Animated.sequence([ return Animated.sequence([
@@ -45,8 +51,8 @@ const AnimatedDots = () => {
<Animated.View style={[styles.dot, { opacity: dot2 }]} /> <Animated.View style={[styles.dot, { opacity: dot2 }]} />
<Animated.View style={[styles.dot, { opacity: dot3 }]} /> <Animated.View style={[styles.dot, { opacity: dot3 }]} />
</View> </View>
) );
} };
const styles = StyleSheet.create({ const styles = StyleSheet.create({
container: { container: {

View File

@@ -1,37 +1,49 @@
"use client" 'use client';
import React, { useEffect, useRef, useMemo, useCallback } from 'react' import React, { useCallback, useEffect, useMemo } from 'react';
import { Animated, Easing, StyleSheet } from 'react-native' import { Animated, Easing, StyleSheet } from 'react-native';
interface AnimatedScreenProps { interface AnimatedScreenProps {
children: React.ReactNode children: React.ReactNode;
keyIndex: number keyIndex: number;
} }
const AnimatedScreen: React.FC<AnimatedScreenProps> = ({ children, keyIndex }) => { const AnimatedScreen: React.FC<AnimatedScreenProps> = ({
const opacityAnim = React.useRef(new Animated.Value(1)).current // Start with opacity 1 children,
const slideAnim = React.useRef(new Animated.Value(0)).current // Start with no slide 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 duration: 150, // Further reduced
useNativeDriver: true, useNativeDriver: true,
}), []); }),
[],
);
const opacityAnimation = useMemo(() => const opacityAnimation = useMemo(
() =>
Animated.timing(opacityAnim, { Animated.timing(opacityAnim, {
toValue: 1, toValue: 1,
duration: 150, // Further reduced duration: 150, // Further reduced
easing: Easing.out(Easing.ease), easing: Easing.out(Easing.ease),
useNativeDriver: true, useNativeDriver: true,
}), [opacityAnim]); }),
[opacityAnim],
);
const slideAnimation = useMemo(() => const slideAnimation = useMemo(
() =>
Animated.timing(slideAnim, { Animated.timing(slideAnim, {
toValue: 0, toValue: 0,
duration: 150, // Further reduced duration: 150, // Further reduced
easing: Easing.out(Easing.ease), easing: Easing.out(Easing.ease),
useNativeDriver: true, useNativeDriver: true,
}), [slideAnim]); }),
[slideAnim],
);
const resetAnimations = useCallback(() => { const resetAnimations = useCallback(() => {
opacityAnim.setValue(1); // Start with full opacity opacityAnim.setValue(1); // Start with full opacity
@@ -48,24 +60,27 @@ const AnimatedScreen: React.FC<AnimatedScreenProps> = ({ children, keyIndex }) =
startAnimations(); startAnimations();
}, [keyIndex, resetAnimations, startAnimations]); }, [keyIndex, resetAnimations, startAnimations]);
const animatedStyle = useMemo(() => ({ const animatedStyle = useMemo(
() => ({
opacity: 1, // Always full opacity opacity: 1, // Always full opacity
transform: [ transform: [
{ translateX: 0 }, // No slide { translateX: 0 }, // No slide
], ],
}), []); }),
[],
);
return ( return (
<Animated.View style={[styles.container, animatedStyle]}> <Animated.View style={[styles.container, animatedStyle]}>
{children} {children}
</Animated.View> </Animated.View>
) );
} };
const styles = StyleSheet.create({ const styles = StyleSheet.create({
container: { container: {
flex: 1, flex: 1,
}, },
}) });
export default AnimatedScreen; 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, Modal,
ScrollView, ScrollView,
StyleSheet, StyleSheet,
Text,
TouchableOpacity, TouchableOpacity,
View, View,
} from 'react-native'; } from 'react-native';
@@ -16,6 +15,7 @@ import Clock from 'svg/Clock';
import CloseIcon from 'svg/Close'; import CloseIcon from 'svg/Close';
import Location from 'svg/Location'; import Location from 'svg/Location';
import Phone from 'svg/Phone'; import Phone from 'svg/Phone';
import AppText from './AppText';
type BottomModalProps = { type BottomModalProps = {
visible: boolean; visible: boolean;
@@ -59,8 +59,8 @@ const BottomModal: React.FC<BottomModalProps> = ({
<View style={styles.row}> <View style={styles.row}>
<Location color="#28A7E8" width={26} height={26} /> <Location color="#28A7E8" width={26} height={26} />
<View style={styles.cardText}> <View style={styles.cardText}>
<Text style={styles.label}>{t('Manzil')}</Text> <AppText style={styles.label}>{t('Manzil')}</AppText>
<Text style={styles.value}>{branch?.address}</Text> <AppText style={styles.value}>{branch?.address}</AppText>
</View> </View>
</View> </View>
</View> </View>
@@ -68,8 +68,8 @@ const BottomModal: React.FC<BottomModalProps> = ({
<View style={styles.row}> <View style={styles.row}>
<Clock color="#28A7E8" width={26} height={26} /> <Clock color="#28A7E8" width={26} height={26} />
<View style={styles.cardText}> <View style={styles.cardText}>
<Text style={styles.label}>{t('Ish vaqti')}</Text> <AppText style={styles.label}>{t('Ish vaqti')}</AppText>
<Text style={styles.value}>{branch?.workingHours}</Text> <AppText style={styles.value}>{branch?.workingHours}</AppText>
</View> </View>
</View> </View>
</View> </View>
@@ -77,8 +77,8 @@ const BottomModal: React.FC<BottomModalProps> = ({
<View style={styles.row}> <View style={styles.row}>
<Phone color="#28A7E8" width={26} height={26} /> <Phone color="#28A7E8" width={26} height={26} />
<View style={styles.cardText}> <View style={styles.cardText}>
<Text style={styles.label}>{t('Telefon')}</Text> <AppText style={styles.label}>{t('Telefon')}</AppText>
<Text style={styles.value}>{branch?.phone}</Text> <AppText style={styles.value}>{branch?.phone}</AppText>
</View> </View>
</View> </View>
</View> </View>
@@ -86,8 +86,10 @@ const BottomModal: React.FC<BottomModalProps> = ({
<View style={styles.row}> <View style={styles.row}>
<Image source={Telegram} style={{ width: 26, height: 26 }} /> <Image source={Telegram} style={{ width: 26, height: 26 }} />
<View style={styles.cardText}> <View style={styles.cardText}>
<Text style={styles.label}>{t('Telegram admin')}</Text> <AppText style={styles.label}>{t('Telegram admin')}</AppText>
<Text style={styles.value}>{branch?.telegramAdmin}</Text> <AppText style={styles.value}>
{branch?.telegramAdmin}
</AppText>
</View> </View>
</View> </View>
</View> </View>
@@ -95,8 +97,10 @@ const BottomModal: React.FC<BottomModalProps> = ({
<View style={styles.row}> <View style={styles.row}>
<Image source={Telegram} style={{ width: 26, height: 26 }} /> <Image source={Telegram} style={{ width: 26, height: 26 }} />
<View style={styles.cardText}> <View style={styles.cardText}>
<Text style={styles.label}>{t('Telegram kanal')}</Text> <AppText style={styles.label}>{t('Telegram kanal')}</AppText>
<Text style={styles.value}>{branch?.telegramChannel}</Text> <AppText style={styles.value}>
{branch?.telegramChannel}
</AppText>
</View> </View>
</View> </View>
</View> </View>
@@ -154,7 +158,7 @@ const styles = StyleSheet.create({
}, },
label: { label: {
fontSize: 16, fontSize: 16,
fontWeight: '600', fontFamily: 'GolosText-Bold',
color: '#000000', color: '#000000',
}, },
value: { value: {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -172,6 +172,9 @@
"Yopish": "Закрыть", "Yopish": "Закрыть",
"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.": "Уважаемый клиент, пожалуйста, введите свой 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": "Мои паспорта", "Passportlarim": "Мои паспорта",
"Hali pasport qo'shilmagan": "Паспорт еще не добавлен", "Hali pasport qo'shilmagan": "Паспорт еще не добавлен",
"Yangi pasport qo'shish uchun tugmani bosing": "Нажмите кнопку, чтобы добавить новый паспорт", "Yangi pasport qo'shish uchun tugmani bosing": "Нажмите кнопку, чтобы добавить новый паспорт",

View File

@@ -18,7 +18,10 @@
"Ro'yxatdan o'tish": "Ro'yxatdan o'tish", "Ro'yxatdan o'tish": "Ro'yxatdan o'tish",
"Manzilingizni kiriting": "Manzilingizni kiriting", "Manzilingizni kiriting": "Manzilingizni kiriting",
"Toshkent Shahri, Mirzo Ulug'bek tumani...": "Toshkent Shahri, Mirzo Ulug'bek tumani...", "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", "Ism": "Ism",
"admindan tasdiqlatib olishingiz kerak boladi.": "admindan tasdiqlatib olishingiz kerak boladi.",
"Ismingiz": "Ismingiz", "Ismingiz": "Ismingiz",
"Familiya": "Familiya", "Familiya": "Familiya",
"Familiyangiz": "Familiyangiz", "Familiyangiz": "Familiyangiz",

View File

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

View File

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

View File

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

View File

@@ -6,6 +6,8 @@ import { NativeStackNavigationProp } from '@react-navigation/native-stack';
import { useMutation } from '@tanstack/react-query'; import { useMutation } from '@tanstack/react-query';
import { authApi } from 'api/auth'; import { authApi } from 'api/auth';
import { otpPayload, resendPayload } from 'api/auth/type'; 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 React, { useEffect, useRef, useState } from 'react';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import { import {
@@ -14,7 +16,6 @@ import {
KeyboardAvoidingView, KeyboardAvoidingView,
Platform, Platform,
StyleSheet, StyleSheet,
Text,
TextInput, TextInput,
TouchableOpacity, TouchableOpacity,
View, View,
@@ -166,10 +167,10 @@ const Confirm = ({
style={RegisterStyle.background} style={RegisterStyle.background}
resizeMode="contain" resizeMode="contain"
imageStyle={{ imageStyle={{
opacity: 0.3, opacity: 0.1,
height: '100%', height: '100%',
width: '100%', width: '100%',
transform: [{ scale: 1.5 }], transform: [{ scale: 1 }],
}} }}
> >
<SafeAreaView style={{ flex: 1 }}> <SafeAreaView style={{ flex: 1 }}>
@@ -184,11 +185,13 @@ const Confirm = ({
behavior={Platform.OS === 'ios' ? 'padding' : 'height'} behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
> >
<View style={styles.content}> <View style={styles.content}>
<Text style={styles.title}>{t('Tasdiqlash kodini kiriting')}</Text> <AppText style={styles.title}>
<Text style={styles.message}> {t('Tasdiqlash kodini kiriting')}
{phoneNumber} {t('raqamiga yuborilgan')} {OTP_LENGTH}{' '} </AppText>
<AppText style={styles.message}>
{formatPhone(phoneNumber)} {t('raqamiga yuborilgan')} {OTP_LENGTH}{' '}
{t('xonali kodni kiriting.')} {t('xonali kodni kiriting.')}
</Text> </AppText>
<View style={styles.otpContainer}> <View style={styles.otpContainer}>
{code.map((digit, index) => ( {code.map((digit, index) => (
<TextInput <TextInput
@@ -207,7 +210,7 @@ const Confirm = ({
))} ))}
</View> </View>
{errorConfirm !== null && ( {errorConfirm !== null && (
<Text style={styles.errorText}>{errorConfirm}</Text> <AppText style={styles.errorText}>{errorConfirm}</AppText>
)} )}
<View style={styles.resendContainer}> <View style={styles.resendContainer}>
{canResend ? ( {canResend ? (
@@ -215,14 +218,14 @@ const Confirm = ({
onPress={handleResendCode} onPress={handleResendCode}
style={styles.resendButton} style={styles.resendButton}
> >
<Text style={styles.resendButtonText}> <AppText style={styles.resendButtonText}>
{t('Kodni qayta yuborish')} {t('Kodni qayta yuborish')}
</Text> </AppText>
</TouchableOpacity> </TouchableOpacity>
) : ( ) : (
<Text style={styles.timerText}> <AppText style={styles.timerText}>
{t('Kodni qayta yuborish vaqti')} ({timer}s) {t('Kodni qayta yuborish vaqti')} ({timer}s)
</Text> </AppText>
)} )}
</View> </View>
<TouchableOpacity <TouchableOpacity
@@ -232,14 +235,14 @@ const Confirm = ({
{isPending ? ( {isPending ? (
<ActivityIndicator color="#fff" /> <ActivityIndicator color="#fff" />
) : ( ) : (
<Text <AppText
style={[ style={[
RegisterStyle.btnText, RegisterStyle.btnText,
isPending && RegisterStyle.buttonTextDisabled, isPending && RegisterStyle.buttonTextDisabled,
]} ]}
> >
{t('Tasdiqlash')} {t('Tasdiqlash')}
</Text> </AppText>
)} )}
</TouchableOpacity> </TouchableOpacity>
</View> </View>
@@ -350,7 +353,7 @@ const styles = StyleSheet.create({
verifyButtonText: { verifyButtonText: {
color: '#fff', color: '#fff',
fontSize: 18, 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 { authApi } from 'api/auth';
import { registerPayload } from 'api/auth/type'; import { registerPayload } from 'api/auth/type';
import { Branch, branchApi } from 'api/branch'; import { Branch, branchApi } from 'api/branch';
import AppText from 'components/AppText';
import formatPhone from 'helpers/formatPhone'; import formatPhone from 'helpers/formatPhone';
import { useEffect, useState } from 'react'; import { useEffect, useState } from 'react';
import { Controller, useForm } from 'react-hook-form'; import { Controller, useForm } from 'react-hook-form';
@@ -24,7 +25,6 @@ import {
KeyboardAvoidingView, KeyboardAvoidingView,
Platform, Platform,
ScrollView, ScrollView,
Text,
TextInput, TextInput,
TouchableOpacity, TouchableOpacity,
View, View,
@@ -194,10 +194,10 @@ const FirstStep = ({ onNext }: { onNext: () => void }) => {
style={RegisterStyle.background} style={RegisterStyle.background}
resizeMode="contain" resizeMode="contain"
imageStyle={{ imageStyle={{
opacity: 0.3, opacity: 0.1,
height: '100%', height: '100%',
width: '100%', width: '100%',
transform: [{ scale: 1.5 }], transform: [{ scale: 1 }],
}} }}
> >
<SafeAreaView style={{ flex: 1 }}> <SafeAreaView style={{ flex: 1 }}>
@@ -217,16 +217,16 @@ const FirstStep = ({ onNext }: { onNext: () => void }) => {
> >
<View style={RegisterStyle.scrollContainer}> <View style={RegisterStyle.scrollContainer}>
<View style={RegisterStyle.loginContainer}> <View style={RegisterStyle.loginContainer}>
<Text style={RegisterStyle.title}> <AppText style={RegisterStyle.title}>
{t("Ro'yxatdan o'tish")} {t("Ro'yxatdan o'tish")}
</Text> </AppText>
<Controller <Controller
control={control} control={control}
name="firstName" name="firstName"
render={({ field: { onChange, value } }) => ( render={({ field: { onChange, value } }) => (
<View> <View>
<Text style={RegisterStyle.label}>{t('Ism')}</Text> <AppText style={RegisterStyle.label}>{t('Ism')} </AppText>
<TextInput <TextInput
style={RegisterStyle.input} style={RegisterStyle.input}
placeholder={t('Ismingiz')} placeholder={t('Ismingiz')}
@@ -235,9 +235,9 @@ const FirstStep = ({ onNext }: { onNext: () => void }) => {
placeholderTextColor={'#D8DADC'} placeholderTextColor={'#D8DADC'}
/> />
{errors.firstName && ( {errors.firstName && (
<Text style={RegisterStyle.errorText}> <AppText style={RegisterStyle.errorText}>
{t(errors.firstName.message || '')} {t(errors.firstName.message || '')}
</Text> </AppText>
)} )}
</View> </View>
)} )}
@@ -247,7 +247,9 @@ const FirstStep = ({ onNext }: { onNext: () => void }) => {
name="lastName" name="lastName"
render={({ field: { onChange, value } }) => ( render={({ field: { onChange, value } }) => (
<View> <View>
<Text style={RegisterStyle.label}>{t('Familiya')}</Text> <AppText style={RegisterStyle.label}>
{t('Familiya')}{' '}
</AppText>
<TextInput <TextInput
style={RegisterStyle.input} style={RegisterStyle.input}
placeholder={t('Familiyangiz')} placeholder={t('Familiyangiz')}
@@ -256,9 +258,9 @@ const FirstStep = ({ onNext }: { onNext: () => void }) => {
value={value} value={value}
/> />
{errors.lastName && ( {errors.lastName && (
<Text style={RegisterStyle.errorText}> <AppText style={RegisterStyle.errorText}>
{t(errors.lastName.message || '')} {t(errors.lastName.message || '')}
</Text> </AppText>
)} )}
</View> </View>
)} )}
@@ -270,9 +272,9 @@ const FirstStep = ({ onNext }: { onNext: () => void }) => {
const formatted = formatPhone(rawPhone); const formatted = formatPhone(rawPhone);
return ( return (
<View> <View>
<Text style={RegisterStyle.label}> <AppText style={RegisterStyle.label}>
{t('Telefon raqami')} {t('Telefon raqami')}
</Text> </AppText>
<TextInput <TextInput
keyboardType="numeric" keyboardType="numeric"
placeholder="+998 __ ___-__-__" placeholder="+998 __ ___-__-__"
@@ -290,9 +292,9 @@ const FirstStep = ({ onNext }: { onNext: () => void }) => {
maxLength={17} maxLength={17}
/> />
{errors.phoneNumber && ( {errors.phoneNumber && (
<Text style={RegisterStyle.errorText}> <AppText style={RegisterStyle.errorText}>
{t(errors.phoneNumber.message || '')} {t(errors.phoneNumber.message || '')}
</Text> </AppText>
)} )}
</View> </View>
); );
@@ -303,7 +305,9 @@ const FirstStep = ({ onNext }: { onNext: () => void }) => {
name="branchId" name="branchId"
render={({ field: { value } }) => ( render={({ field: { value } }) => (
<View style={{ position: 'relative' }}> <View style={{ position: 'relative' }}>
<Text style={RegisterStyle.label}>{t('Filial')}</Text> <AppText style={RegisterStyle.label}>
{t('Filial')}{' '}
</AppText>
<View style={RegisterStyle.input}> <View style={RegisterStyle.input}>
<TouchableOpacity <TouchableOpacity
style={RegisterStyle.selector} style={RegisterStyle.selector}
@@ -311,7 +315,7 @@ const FirstStep = ({ onNext }: { onNext: () => void }) => {
setFilialDropdownVisible(prev => !prev) setFilialDropdownVisible(prev => !prev)
} }
> >
<Text <AppText
style={ style={
value value
? { color: '#000' } ? { color: '#000' }
@@ -320,7 +324,7 @@ const FirstStep = ({ onNext }: { onNext: () => void }) => {
> >
{branchList?.find(e => e.id === value)?.name || {branchList?.find(e => e.id === value)?.name ||
t('Filialni tanlang...')} t('Filialni tanlang...')}
</Text> </AppText>
{filialDropdownVisible ? ( {filialDropdownVisible ? (
<ArrowUp color={'#000'} /> <ArrowUp color={'#000'} />
) : ( ) : (
@@ -343,18 +347,20 @@ const FirstStep = ({ onNext }: { onNext: () => void }) => {
setFilialDropdownVisible(false); setFilialDropdownVisible(false);
}} }}
> >
<Text style={RegisterStyle.dropdownItemText}> <AppText
style={RegisterStyle.dropdownItemText}
>
{item.name} {item.name}
</Text> </AppText>
</TouchableOpacity> </TouchableOpacity>
))} ))}
</ScrollView> </ScrollView>
</View> </View>
)} )}
{errors.branchId && ( {errors.branchId && (
<Text style={RegisterStyle.errorText}> <AppText style={RegisterStyle.errorText}>
{t(errors.branchId.message || '')} {t(errors.branchId.message || '')}
</Text> </AppText>
)} )}
</View> </View>
)} )}
@@ -364,9 +370,9 @@ const FirstStep = ({ onNext }: { onNext: () => void }) => {
name="address" name="address"
render={({ field: { onChange, value } }) => ( render={({ field: { onChange, value } }) => (
<View> <View>
<Text style={RegisterStyle.label}> <AppText style={RegisterStyle.label}>
{t('Manzilingizni kiriting')} {t('Manzilingizni kiriting')}
</Text> </AppText>
<TextInput <TextInput
style={RegisterStyle.input} style={RegisterStyle.input}
placeholder={t( placeholder={t(
@@ -377,9 +383,9 @@ const FirstStep = ({ onNext }: { onNext: () => void }) => {
value={value} value={value}
/> />
{errors.lastName && ( {errors.lastName && (
<Text style={RegisterStyle.errorText}> <AppText style={RegisterStyle.errorText}>
{t(errors.lastName.message || '')} {t(errors.lastName.message || '')}
</Text> </AppText>
)} )}
</View> </View>
)} )}
@@ -389,9 +395,9 @@ const FirstStep = ({ onNext }: { onNext: () => void }) => {
name="recommend" name="recommend"
render={({ field: { value } }) => ( render={({ field: { value } }) => (
<View style={{ position: 'relative' }}> <View style={{ position: 'relative' }}>
<Text style={RegisterStyle.label}> <AppText style={RegisterStyle.label}>
{t('Bizni qaerdan topdingiz?')} {t('Bizni qaerdan topdingiz?')}
</Text> </AppText>
<View style={RegisterStyle.input}> <View style={RegisterStyle.input}>
<TouchableOpacity <TouchableOpacity
style={RegisterStyle.selector} style={RegisterStyle.selector}
@@ -399,7 +405,7 @@ const FirstStep = ({ onNext }: { onNext: () => void }) => {
setRecommendedDropdownVisible(prev => !prev) setRecommendedDropdownVisible(prev => !prev)
} }
> >
<Text <AppText
style={ style={
value value
? { color: '#000' } ? { color: '#000' }
@@ -410,7 +416,7 @@ const FirstStep = ({ onNext }: { onNext: () => void }) => {
recommended.find(e => e.value === value)?.label || recommended.find(e => e.value === value)?.label ||
'Bizni kim tavsiya qildi...', 'Bizni kim tavsiya qildi...',
)} )}
</Text> </AppText>
{recommendedDropdownVisible ? ( {recommendedDropdownVisible ? (
<ArrowUp color={'#000'} /> <ArrowUp color={'#000'} />
) : ( ) : (
@@ -432,23 +438,23 @@ const FirstStep = ({ onNext }: { onNext: () => void }) => {
setRecommendedDropdownVisible(false); setRecommendedDropdownVisible(false);
}} }}
> >
<Text style={RegisterStyle.dropdownItemText}> <AppText style={RegisterStyle.dropdownItemText}>
{t(item.label)} {t(item.label)}
</Text> </AppText>
</TouchableOpacity> </TouchableOpacity>
))} ))}
</ScrollView> </ScrollView>
</View> </View>
)} )}
{errors.recommend && ( {errors.recommend && (
<Text style={RegisterStyle.errorText}> <AppText style={RegisterStyle.errorText}>
{t(errors.recommend.message || '')} {t(errors.recommend.message || '')}
</Text> </AppText>
)} )}
{error && ( {error && (
<Text style={[RegisterStyle.errorText]}> <AppText style={[RegisterStyle.errorText]}>
{t(error)} {t(error)}
</Text> </AppText>
)} )}
</View> </View>
)} )}
@@ -491,10 +497,10 @@ const FirstStep = ({ onNext }: { onNext: () => void }) => {
)} )}
</Animated.View> </Animated.View>
<View style={RegisterStyle.termsTextContainer}> <View style={RegisterStyle.termsTextContainer}>
<Text style={RegisterStyle.termsText}> <AppText style={RegisterStyle.termsText}>
<Text>{t('Foydalanish shartlari')}</Text> <AppText>{t('Foydalanish shartlari')} </AppText>
<Text> {t('bilan tanishib chiqdim!')}</Text> <AppText> {t('bilan tanishib chiqdim!')} </AppText>
</Text> </AppText>
</View> </View>
</TouchableOpacity> </TouchableOpacity>
</View> </View>
@@ -511,7 +517,7 @@ const FirstStep = ({ onNext }: { onNext: () => void }) => {
{isPending ? ( {isPending ? (
<ActivityIndicator color="#fff" /> <ActivityIndicator color="#fff" />
) : ( ) : (
<Text <AppText
style={[ style={[
RegisterStyle.btnText, RegisterStyle.btnText,
(!termsAccepted || isPending) && (!termsAccepted || isPending) &&
@@ -519,7 +525,7 @@ const FirstStep = ({ onNext }: { onNext: () => void }) => {
]} ]}
> >
{t('Davom etish')} {t('Davom etish')}
</Text> </AppText>
)} )}
</TouchableOpacity> </TouchableOpacity>
</View> </View>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,442 +1,13 @@
import AsyncStorage from '@react-native-async-storage/async-storage'; import AppText from 'components/AppText';
import { useNavigation, useRoute } from '@react-navigation/native'; import React from 'react';
import { NativeStackNavigationProp } from '@react-navigation/native-stack'; import { View } from 'react-native';
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>
);
};
const AddedLock = () => { 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 ( return (
<SafeAreaView style={{ flex: 1 }}> <View>
<View style={styles.container}> <AppText>AddedLock</AppText>
<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> </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; export default AddedLock;

View File

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

View File

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

View File

@@ -1,3 +1,4 @@
import AppText from 'components/AppText';
import NavbarBack from 'components/NavbarBack'; import NavbarBack from 'components/NavbarBack';
import * as React from 'react'; import * as React from 'react';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
@@ -7,7 +8,6 @@ import {
RefreshControl, RefreshControl,
ScrollView, ScrollView,
StyleSheet, StyleSheet,
Text,
TextInput, TextInput,
TouchableOpacity, TouchableOpacity,
View, View,
@@ -85,11 +85,11 @@ const Support = (props: SupportProps) => {
msg.fromUser ? styles.userBubble : styles.supportBubble, msg.fromUser ? styles.userBubble : styles.supportBubble,
]} ]}
> >
<Text <AppText
style={msg.fromUser ? styles.userText : styles.supportText} style={msg.fromUser ? styles.userText : styles.supportText}
> >
{msg.text} {msg.text}
</Text> </AppText>
</View> </View>
))} ))}
</ScrollView> </ScrollView>
@@ -102,7 +102,7 @@ const Support = (props: SupportProps) => {
placeholderTextColor="#999" placeholderTextColor="#999"
/> />
<TouchableOpacity onPress={sendMessage} style={styles.sendButton}> <TouchableOpacity onPress={sendMessage} style={styles.sendButton}>
<Text style={styles.sendButtonText}>{t('Yuborish')}</Text> <AppText style={styles.sendButtonText}>{t('Yuborish')}</AppText>
</TouchableOpacity> </TouchableOpacity>
</View> </View>
</KeyboardAvoidingView> </KeyboardAvoidingView>
@@ -176,6 +176,6 @@ const styles = StyleSheet.create({
sendButtonText: { sendButtonText: {
color: '#fff', color: '#fff',
fontSize: 14, 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 { useQuery } from '@tanstack/react-query';
import { authApi } from 'api/auth'; import { authApi } from 'api/auth';
import warhouses_api from 'api/warhouses'; import warhouses_api from 'api/warhouses';
import AppText from 'components/AppText';
import React from 'react'; import React from 'react';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import { import {
FlatList, FlatList,
StyleSheet, StyleSheet,
Text,
TouchableOpacity, TouchableOpacity,
useWindowDimensions, useWindowDimensions,
View, View,
@@ -108,11 +108,11 @@ const TabsAutoWarehouses = () => {
<View style={[styles.card, { marginRight: isLast ? 0 : 10 }]}> <View style={[styles.card, { marginRight: isLast ? 0 : 10 }]}>
<View style={styles.titleCard}> <View style={styles.titleCard}>
<Kitay width={24 * scale} height={24 * scale} /> <Kitay width={24 * scale} height={24 * scale} />
<Text style={styles.title}>China (Auto)</Text> <AppText style={styles.title}>China (Auto)</AppText>
</View> </View>
<View style={styles.infoId}> <View style={styles.infoId}>
<View style={{ gap: 4 * scale, width: '90%' }}> <View style={{ gap: 4 * scale, width: '90%' }}>
<Text style={styles.infoText}>{item}</Text> <AppText style={styles.infoText}>{item}</AppText>
</View> </View>
<TouchableOpacity onPress={() => handleCopy(item.addressInfo)}> <TouchableOpacity onPress={() => handleCopy(item.addressInfo)}>
<Copy color="#28A7E8" width={24 * scale} height={24 * scale} /> <Copy color="#28A7E8" width={24 * scale} height={24 * scale} />
@@ -141,7 +141,7 @@ const makeStyles = (scale: number, cardWidth: number, screenWidth: number) =>
}, },
title: { title: {
fontSize: 20 * scale, fontSize: 20 * scale,
fontWeight: '600', fontFamily: 'GolosText-Bold',
color: '#101623CC', color: '#101623CC',
}, },
infoId: { infoId: {

View File

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

View File

@@ -1,5 +1,6 @@
import { useQuery } from '@tanstack/react-query'; import { useQuery } from '@tanstack/react-query';
import { authApi } from 'api/auth'; import { authApi } from 'api/auth';
import AppText from 'components/AppText';
import SingleFileDrop from 'components/FileDrop'; import SingleFileDrop from 'components/FileDrop';
import LayoutTwo from 'components/LayoutTwo'; import LayoutTwo from 'components/LayoutTwo';
import * as React from 'react'; import * as React from 'react';
@@ -7,13 +8,14 @@ import { useTranslation } from 'react-i18next';
import { import {
ActivityIndicator, ActivityIndicator,
Image, Image,
Linking,
RefreshControl, RefreshControl,
ScrollView, ScrollView,
StyleSheet, StyleSheet,
Text,
TouchableOpacity, TouchableOpacity,
View, View,
} from 'react-native'; } from 'react-native';
import AppLink from 'react-native-app-link';
import Toast from 'react-native-toast-message'; import Toast from 'react-native-toast-message';
import Shablon from 'screens/../../assets/bootsplash/shablon.jpg'; import Shablon from 'screens/../../assets/bootsplash/shablon.jpg';
import TabsAutoWarehouses from './TabsAutoWarehouses'; import TabsAutoWarehouses from './TabsAutoWarehouses';
@@ -96,6 +98,19 @@ Cargo Idsi: ${getMe?.aviaCargoId}
() => ({ paddingBottom: 10 }), () => ({ 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 ( return (
<LayoutTwo title={t('Xitoy omborlari manzili')}> <LayoutTwo title={t('Xitoy omborlari manzili')}>
<ScrollView <ScrollView
@@ -104,39 +119,84 @@ Cargo Idsi: ${getMe?.aviaCargoId}
contentContainerStyle={contentContainerStyle} contentContainerStyle={contentContainerStyle}
> >
<View style={styles.card}> <View style={styles.card}>
<Text style={styles.title}>{t('Bizning Xitoy manzilimiz')}</Text> <AppText style={[styles.title]}>
<Text style={styles.text}> {t('Bizning Xitoy manzilimiz')}
</AppText>
<AppText style={[styles.text]}>
{t( {t(
'Taobao, pinduoduo, 1688 ,alibaba va Xitoyning istalgan platformasiga kiritish uchun', 'Taobao, pinduoduo, 1688 ,alibaba va Xitoyning istalgan platformasiga kiritish uchun',
)} )}
</Text> </AppText>
<TabsAviaWarehouses /> <TabsAviaWarehouses />
<TabsAutoWarehouses /> <TabsAutoWarehouses />
<Text style={styles.title}> <AppText style={[styles.title]}>
{t('Xitoy omborlarimiz manzilini programmaga kiriting')} {t('Xitoy omborlarimiz manzilini programmaga kiriting')}
</Text> </AppText>
<View style={{ gap: 20 }}> <View style={{ gap: 20 }}>
<Text style={styles.text}> <AppText style={[styles.text]}>
{t( {t(
"Diqqat! Iltimos, Xitoy omborimiz manzilini Xitoy programmalariga kiritganingizdan so'ng, kiritilgan holatdagi skrenshotni bizga yuborib, tekshirtiring", "Diqqat! Iltimos, Xitoy omborimiz manzilini Xitoy programmalariga kiritganingizdan so'ng, kiritilgan holatdagi skrenshotni bizga yuborib, tekshirtiring",
)} )}
</Text> </AppText>
<Text style={styles.text}> <AppText style={[styles.text]}>
{t( {t(
"Xitoy ombori manzilini to'g'ri kiritish, mahsulotingiz yo'qolib qolish oldini oladi.", "Xitoy ombori manzilini to'g'ri kiritish, mahsulotingiz yo'qolib qolish oldini oladi.",
)} )}
</Text> </AppText>
<Text style={styles.text}> <AppText style={[styles.text]}>
{t( {t(
"Agar sizda savol tug'ilsa yoki biron narsaga tushunmasangiz bizga murojaat qiling", "Agar sizda savol tug'ilsa yoki biron narsaga tushunmasangiz bizga murojaat qiling",
)} )}
</Text> </AppText>
</View> </View>
<Text style={styles.title}>{t('Skrenshot rasmini yuklang')}</Text> <AppText style={[styles.title]}>
{t('Skrenshot rasmini yuklang')}
</AppText>
<Image <Image
source={Shablon} 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 <SingleFileDrop
title={t('Rasmni shu yerga yuklang')} title={t('Rasmni shu yerga yuklang')}
onFileSelected={setBackImage} onFileSelected={setBackImage}
@@ -150,7 +210,9 @@ Cargo Idsi: ${getMe?.aviaCargoId}
{isLoading ? ( {isLoading ? (
<ActivityIndicator size="small" color="#fff" /> <ActivityIndicator size="small" color="#fff" />
) : ( ) : (
<Text style={styles.btnText}>{t('Manzilni tekshirish')}</Text> <AppText style={[styles.btnText]}>
{t('Manzilni tekshirish')}
</AppText>
)} )}
</TouchableOpacity> </TouchableOpacity>
</View> </View>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,8 +1,8 @@
import AppText from 'components/AppText';
import React from 'react'; import React from 'react';
import { import {
Image, Image,
StyleSheet, StyleSheet,
Text,
TouchableOpacity, TouchableOpacity,
View, View,
useWindowDimensions, 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} {texts[lang].title}
</Text> </AppText>
<Text <AppText
style={[ style={[
styles.text, styles.text,
{ fontSize: screenWidth * 0.04 * scale, marginTop: 10 * scale }, { fontSize: screenWidth * 0.04 * scale, marginTop: 10 * scale },
]} ]}
> >
{texts[lang].description} {texts[lang].description}
</Text> </AppText>
</View> </View>
<View <View

View File

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

View File

@@ -1,8 +1,8 @@
import AppText from 'components/AppText';
import React from 'react'; import React from 'react';
import { import {
Image, Image,
StyleSheet, StyleSheet,
Text,
TouchableOpacity, TouchableOpacity,
View, View,
useWindowDimensions, 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} {texts[lang].title}
</Text> </AppText>
<Text <AppText
style={[ style={[
styles.text, styles.text,
{ fontSize: screenWidth * 0.04 * scale, marginTop: 10 * scale }, { fontSize: screenWidth * 0.04 * scale, marginTop: 10 * scale },
]} ]}
> >
{texts[lang].description} {texts[lang].description}
</Text> </AppText>
</View> </View>
<View <View

View File

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