Browse Source

fix: resolve merge conflicts in App.tsx and yarn.lock

main
unknown 4 weeks ago
parent
commit
e9636e2a06
  1. 776
      App.tsx
  2. 674
      app/i18n/index.ts
  3. 2
      app/screens/MainApp.tsx
  4. 57
      app/screens/Recipient/ConfirmOrder.tsx
  5. 17
      app/screens/setting/CountrySetting.tsx
  6. 5
      app/screens/setting/SettingList.tsx
  7. 1236
      yarn.lock

776
App.tsx

@ -81,8 +81,6 @@ function AppContent() {
const { login, logout } = useAuth();
const getUserInfo = async () => {
console.log(123);
const token = await AsyncStorage.getItem('token');
if(token){
try {
@ -100,262 +98,266 @@ function AppContent() {
}, []);
return (
<NavigationContainer>
<Stack.Navigator
screenOptions={{
headerShown: false,
}}
>
<Stack.Screen name="CountrySelect" component={CountrySelect} />
<Stack.Screen
name="Login"
component={LoginScreen}
options={{
presentation: "modal",
animation: "slide_from_bottom",
gestureEnabled: true,
gestureDirection: "vertical",
}}
/>
<Stack.Screen
name="MainTabs"
component={TabNavigator}
options={{
gestureEnabled: false,
}}
/>
<Stack.Screen
name="EmailLogin"
component={EmailLoginScreen}
options={{
presentation: "modal",
animation: "slide_from_bottom",
gestureEnabled: true,
gestureDirection: "vertical",
}}
/>
<Stack.Screen
name="Search"
component={SearchScreen}
options={{
presentation: "fullScreenModal",
animation: "fade",
animationDuration: 200,
gestureEnabled: true,
gestureDirection: "vertical",
contentStyle: { backgroundColor: "#ffffff" },
}}
/>
<Stack.Screen
name="SearchResult"
component={SearchResultScreen}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="ProductDetail"
component={ProductDetailScreen}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="Balance"
component={BalanceScreen}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="ShippingDetailsSection"
component={ShippingDetailsSection}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="InquiryScreen"
component={InquiryScreen}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="Recipient"
component={Recipient}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="AddRess"
component={AddRess}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="SettingList"
component={SettingList}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="CountrySetting"
component={CountrySetting}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="MyAddress"
component={MyAddress}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="CartScreen"
component={CartScreen}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="PaymentSuccessScreen"
component={PaymentSuccessScreen}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="MyAccount"
component={MyAccount}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="Google"
component={GoogleScreen}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="ConfirmOrder"
component={ConfirmOrder}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="Pay"
component={Pay}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="Status"
component={Status}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="OrderDetails"
component={OrderDetails}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="TikTokScreen"
component={TikTokScreen}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="BrowseHistoryScreen"
component={BrowseHistoryScreen}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="Collection"
component={Collection}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="MemberIntroduction"
component={MemberIntroduction}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="CompanyScreen"
component={CompanyScreen}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
</Stack.Navigator>
</NavigationContainer>
<GestureHandlerRootView style={{ flex: 1 }}>
<AuthProvider>
<NavigationContainer>
<Stack.Navigator
screenOptions={{
headerShown: false,
}}
>
<Stack.Screen name="CountrySelect" component={CountrySelect} />
<Stack.Screen
name="Login"
component={LoginScreen}
options={{
presentation: "modal",
animation: "slide_from_bottom",
gestureEnabled: true,
gestureDirection: "vertical",
}}
/>
<Stack.Screen
name="MainTabs"
component={TabNavigator}
options={{
gestureEnabled: false,
}}
/>
<Stack.Screen
name="EmailLogin"
component={EmailLoginScreen}
options={{
presentation: "modal",
animation: "slide_from_bottom",
gestureEnabled: true,
gestureDirection: "vertical",
}}
/>
<Stack.Screen
name="Search"
component={SearchScreen}
options={{
presentation: "fullScreenModal",
animation: "fade",
animationDuration: 200,
gestureEnabled: true,
gestureDirection: "vertical",
contentStyle: { backgroundColor: "#ffffff" },
}}
/>
<Stack.Screen
name="SearchResult"
component={SearchResultScreen}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="ProductDetail"
component={ProductDetailScreen}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="Balance"
component={BalanceScreen}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="ShippingDetailsSection"
component={ShippingDetailsSection}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="InquiryScreen"
component={InquiryScreen}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="Recipient"
component={Recipient}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="AddRess"
component={AddRess}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="SettingList"
component={SettingList}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="CountrySetting"
component={CountrySetting}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="MyAddress"
component={MyAddress}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="CartScreen"
component={CartScreen}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="PaymentSuccessScreen"
component={PaymentSuccessScreen}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="MyAccount"
component={MyAccount}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="Google"
component={GoogleScreen}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="ConfirmOrder"
component={ConfirmOrder}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="Pay"
component={Pay}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="Status"
component={Status}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="OrderDetails"
component={OrderDetails}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="TikTokScreen"
component={TikTokScreen}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="BrowseHistoryScreen"
component={BrowseHistoryScreen}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="Collection"
component={Collection}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="MemberIntroduction"
component={MemberIntroduction}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="CompanyScreen"
component={CompanyScreen}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
</Stack.Navigator>
</NavigationContainer>
<Toast />
</AuthProvider>
</GestureHandlerRootView>
);
}
@ -363,9 +365,263 @@ export default function App() {
return (
<GestureHandlerRootView style={{ flex: 1 }}>
<AuthProvider>
<AppContent />
<NavigationContainer>
<Stack.Navigator
screenOptions={{
headerShown: false,
}}
>
<Stack.Screen name="CountrySelect" component={CountrySelect} />
<Stack.Screen
name="Login"
component={LoginScreen}
options={{
presentation: "modal",
animation: "slide_from_bottom",
gestureEnabled: true,
gestureDirection: "vertical",
}}
/>
<Stack.Screen
name="MainTabs"
component={TabNavigator}
options={{
gestureEnabled: false,
}}
/>
<Stack.Screen
name="EmailLogin"
component={EmailLoginScreen}
options={{
presentation: "modal",
animation: "slide_from_bottom",
gestureEnabled: true,
gestureDirection: "vertical",
}}
/>
<Stack.Screen
name="Search"
component={SearchScreen}
options={{
presentation: "fullScreenModal",
animation: "fade",
animationDuration: 200,
gestureEnabled: true,
gestureDirection: "vertical",
contentStyle: { backgroundColor: "#ffffff" },
}}
/>
<Stack.Screen
name="SearchResult"
component={SearchResultScreen}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="ProductDetail"
component={ProductDetailScreen}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="Balance"
component={BalanceScreen}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="ShippingDetailsSection"
component={ShippingDetailsSection}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="InquiryScreen"
component={InquiryScreen}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="Recipient"
component={Recipient}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="AddRess"
component={AddRess}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="SettingList"
component={SettingList}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="CountrySetting"
component={CountrySetting}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="MyAddress"
component={MyAddress}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="CartScreen"
component={CartScreen}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="PaymentSuccessScreen"
component={PaymentSuccessScreen}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="MyAccount"
component={MyAccount}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="Google"
component={GoogleScreen}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="ConfirmOrder"
component={ConfirmOrder}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="Pay"
component={Pay}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="Status"
component={Status}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="OrderDetails"
component={OrderDetails}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="TikTokScreen"
component={TikTokScreen}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="BrowseHistoryScreen"
component={BrowseHistoryScreen}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="Collection"
component={Collection}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="MemberIntroduction"
component={MemberIntroduction}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
<Stack.Screen
name="CompanyScreen"
component={CompanyScreen}
options={{
animation: "slide_from_right",
gestureEnabled: true,
gestureDirection: "horizontal",
}}
/>
</Stack.Navigator>
</NavigationContainer>
<Toast />
</AuthProvider>
<Toast />
</GestureHandlerRootView>
);
}

674
app/i18n/index.ts

@ -1,310 +1,390 @@
import i18n from 'i18next';
import { initReactI18next } from 'react-i18next';
import * as Localization from 'expo-localization';
import AsyncStorage from '@react-native-async-storage/async-storage';
import enTranslation from '../locales/en/translation.json';
import zhTranslation from '../locales/zh/translation.json';
import frTranslation from '../locales/fr/translation.json';
const resources = {
en: {
translation: {
selectCountry: 'Select your country',
subtitle: 'You can change the country & language in your profile settings anytime.',
welcomeTitle: 'Welcome!',
welcomeMessage: 'Thank you for choosing your country. You can now log in and use the app.',
loginNow: 'Log in now',
mainAppTitle: 'Welcome to MainApp',
mainAppText: 'This is the main application screen.',
resetCountry: 'Reset Country Selection',
loginTitle: 'Login For brainnel',
loginSubtitle: 'Login to start your business',
continueWithGoogle: 'Continue with Google',
continueWithFacebook: 'Continue with Facebook',
continueWithApple: 'Continue with Apple',
continueWithInstagram: 'Continue with Instagram',
continueWithEmail: 'Continue with Email',
continueWithPhone: 'Continue with phone number',
orContinueWith: 'Or continue with',
instagram: 'Instagram',
email: 'Email',
phone: 'Phone',
forgotPassword: 'Forget your password?',
termsText: 'By continuing, you agree to our',
termsOfUse: 'Terms of Use',
and: 'and',
privacyPolicy: 'Privacy Policy',
wholesalePrice: 'Wholesale price',
fastShipping: 'Fast shipping',
// Home Screen
shipping: 'Shipping',
quote: 'Quote',
tiktok: 'TikTok',
howToBuy: 'How to Buy',
all: 'All',
electronics: 'Electronics',
clothing: 'Clothing',
home: 'Home',
beauty: 'Beauty',
kids: 'Kids',
// Phone login screen
logInOrSignUp: 'Log in or sign up',
phoneNumber: 'Phone number',
enterPassword: 'Please re-enter your password',
passwordIncorrect: 'Password incorrect, please confirm your password.',
verificationCodeInfo: 'We will send a verification code on your number to confirm it\'s you.',
continue: 'Continue',
// Email login screen
pleaseEnterEmail: 'Please enter your e-mail address',
// Search Result Screen
searchProducts: 'Search products',
priceRange: 'Price range',
minPrice: 'Min price',
maxPrice: 'Max price',
reset: 'Reset',
apply: 'Apply',
price: 'Price',
lowToHigh: 'Low to high',
highToLow: 'High to low',
time: 'Time',
oldest: 'Oldest',
newest: 'Newest',
noResults: 'No results found for',
tryDifferentKeywords: 'Try using different keywords or check your spelling',
loadingMore: 'Loading more...',
noMoreData: 'No more data',
monthlySales: 'ventes',
// Search Screen
search: 'Search',
searchPlaceholder: 'Search products',
cancel: 'Cancel',
searchHistory: 'Search History',
hotSearch: 'Hot Search',
noRecentSearches: 'You have not recent searches',
headphones: 'Headphones',
computer: 'Computer',
tablet: 'Tablet',
watch: 'Watch',
camera: 'Camera',
homeAppliance: 'Home Appliance',
food: 'Food',
// Popular search terms
summerWomenClothes: 'Summer women clothes',
plusSizeWomen: 'Plus size women',
sexyUnderwear: 'Sexy underwear',
homeDecor: 'Home decor',
unusualToys: 'Unusual toys',
// Product Detail Screen
productDetail: 'Product Detail',
addToCart: 'Add to Cart',
buyNow: 'Buy Now',
color: 'Color',
size: 'Size',
moreFromStore: 'More from this Store',
viewAll: 'View All',
loadingProductInfo: 'Loading product information...',
productNotAvailable: 'Product is not available or has been removed',
customerService: 'Customer Service',
productDetails: 'Product Details',
loadingMoreProducts: 'Loading more products...',
noMoreProducts: 'No more products',
chatNow: 'Chat Now',
popularCategories: 'Popular Categories',
},
},
fr: {
translation: {
selectCountry: 'Sélectionnez votre pays',
subtitle: 'Vous pouvez modifier le pays et la langue dans les paramètres de votre profil à tout moment.',
welcomeTitle: 'Bienvenue!',
welcomeMessage: 'Merci d\'avoir choisi votre pays. Vous pouvez maintenant vous connecter et utiliser l\'application.',
loginNow: 'Se connecter maintenant',
mainAppTitle: 'Bienvenue sur MainApp',
mainAppText: 'Ceci est l\'écran principal de l\'application.',
resetCountry: 'Réinitialiser la sélection du pays',
loginTitle: 'Connexion à brainnel',
loginSubtitle: 'Connectez-vous pour démarrer votre entreprise',
continueWithGoogle: 'Continuer avec Google',
continueWithFacebook: 'Continuer avec Facebook',
continueWithApple: 'Continuer avec Apple',
continueWithInstagram: 'Continuer avec Instagram',
continueWithEmail: 'Continuer avec Email',
continueWithPhone: 'Continuer avec numéro de téléphone',
orContinueWith: 'Ou continuer avec',
instagram: 'Instagram',
email: 'Email',
phone: 'Téléphone',
forgotPassword: 'Mot de passe oublié?',
termsText: 'En continuant, vous acceptez nos',
termsOfUse: 'Conditions d\'utilisation',
and: 'et',
privacyPolicy: 'Politique de confidentialité',
wholesalePrice: 'Prix de gros',
fastShipping: 'Livraison rapide',
// Home Screen
shipping: 'Expédition',
quote: 'Devis',
tiktok: 'TikTok',
howToBuy: 'Comment acheter',
all: 'Tous',
electronics: 'Électronique',
clothing: 'Vêtements',
home: 'Maison',
beauty: 'Beauté',
kids: 'Enfants',
// Phone login screen
logInOrSignUp: 'Se connecter ou s\'inscrire',
phoneNumber: 'Numéro de téléphone',
enterPassword: 'Veuillez saisir à nouveau votre mot de passe',
passwordIncorrect: 'Mot de passe incorrect, veuillez confirmer votre mot de passe.',
verificationCodeInfo: 'Nous vous enverrons un code de vérification sur votre numéro pour confirmer que c\'est bien vous.',
continue: 'Continuer',
// Email login screen
pleaseEnterEmail: 'Veuillez entrer votre adresse e-mail',
// Search Result Screen
searchProducts: 'Rechercher des produits',
priceRange: 'Gamme de prix',
minPrice: 'Prix minimum',
maxPrice: 'Prix maximum',
reset: 'Réinitialiser',
apply: 'Appliquer',
price: 'Prix',
lowToHigh: 'Bas à élevé',
highToLow: 'Élevé à bas',
time: 'Temps',
oldest: 'Plus ancien',
newest: 'Plus récent',
noResults: 'Aucun résultat trouvé pour',
tryDifferentKeywords: 'Essayez d\'utiliser des mots-clés différents ou vérifiez votre orthographe',
loadingMore: 'Chargement...',
noMoreData: 'Plus de données',
monthlySales: 'Ventes mensuelles',
// Search Screen
search: 'Rechercher',
searchPlaceholder: 'Recherche',
cancel: 'Annuler',
searchHistory: 'Recherches récentes',
hotSearch: 'Populaires en ce moment',
noRecentSearches: 'Vous n\'avez pas de recherches récentes',
headphones: 'Écouteurs',
computer: 'Ordinateur',
tablet: 'Tablette',
watch: 'Montre',
camera: 'Appareil photo',
homeAppliance: 'Électroménager',
food: 'Alimentation',
// Popular search terms
summerWomenClothes: 'Vêtements d\'été femmes',
plusSizeWomen: 'Grande taille femmes',
sexyUnderwear: 'Sous vêtements hot',
homeDecor: 'Objet déco salon',
unusualToys: 'Jouet insolite',
// Product Detail Screen
productDetail: 'Détail du Produit',
addToCart: 'Ajouter au Panier',
buyNow: 'Acheter Maintenant',
color: 'Couleur',
size: 'Taille',
moreFromStore: 'Plus de ce Magasin',
viewAll: 'Voir Tout',
loadingProductInfo: 'Chargement des informations produit...',
productNotAvailable: 'Le produit n\'est pas disponible ou a été supprimé',
customerService: 'Service Client',
productDetails: 'Détails du Produit',
loadingMoreProducts: 'Chargement de plus de produits...',
noMoreProducts: 'Plus de produits',
chatNow: 'Discuter',
popularCategories: 'Catégories populaires',
},
},
zh: {
translation: {
// Home Screen
searchProducts: '搜索商品',
shipping: '运输',
quote: '报价',
tiktok: '抖音',
howToBuy: '如何购买',
all: '全部',
electronics: '电子产品',
clothing: '服装',
home: '家居',
beauty: '美妆',
kids: '儿童',
// Search Result Screen
priceRange: '价格范围',
minPrice: '最低价',
maxPrice: '最高价',
reset: '重置',
apply: '应用',
price: '价格',
lowToHigh: '低到高',
highToLow: '高到低',
time: '时间',
oldest: '最早',
newest: '最新',
noResults: '未找到搜索结果',
tryDifferentKeywords: '尝试使用不同的关键词或检查拼写',
loadingMore: '正在加载更多...',
noMoreData: '没有更多数据了',
monthlySales: '月销量',
// Search Screen
search: '搜索',
searchPlaceholder: '搜索商品',
cancel: '取消',
searchHistory: '历史搜索',
hotSearch: '热门搜索',
noRecentSearches: '暂无搜索记录',
phone: '手机',
headphones: '耳机',
computer: '电脑',
tablet: '平板',
watch: '手表',
camera: '相机',
homeAppliance: '家电',
food: '食品',
// Popular search terms
summerWomenClothes: '女士夏装',
plusSizeWomen: '女士大码',
sexyUnderwear: '性感内衣',
homeDecor: '家居装饰',
unusualToys: '奇特玩具',
// Product Detail Screen
productDetail: '商品详情',
addToCart: '加入购物车',
buyNow: '立即购买',
color: '颜色',
size: '尺寸',
moreFromStore: '来自此店铺的更多商品',
viewAll: '查看全部',
loadingProductInfo: '加载商品信息...',
productNotAvailable: '商品不存在或已下架',
customerService: '客服',
productDetails: '产品详情',
loadingMoreProducts: '正在加载更多产品...',
noMoreProducts: '没有更多产品了',
chatNow: '立即聊天',
popularCategories: '热门分类',
}
}
};
// 本地存储的语言键
const LANGUAGE_KEY = '@app_language';
const getDefaultLanguage = () => {
const locale = Localization.locale;
const languageCode = locale.split('-')[0]; // Get the language code part
return languageCode === 'fr' ? 'fr' : 'en';
};
// 获取设备语言
const deviceLanguage = Localization.locale.split('-')[0];
// 初始化 i18n
i18n
.use(initReactI18next)
.init({
resources,
lng: getDefaultLanguage(),
fallbackLng: 'en',
resources: {
en: {
translation: enTranslation
},
zh: {
translation: zhTranslation
},
fr: {
translation: frTranslation
}
},
lng: deviceLanguage, // 使用设备语言
fallbackLng: 'en', // 如果找不到翻译,使用英语
interpolation: {
escapeValue: false,
escapeValue: false // 不需要转义 HTML
},
compatibilityJSON: 'v4' // 兼容 React Native
});
export default i18n;
// 从本地存储加载语言设置
const loadLanguage = async () => {
try {
const savedLanguage = await AsyncStorage.getItem(LANGUAGE_KEY);
if (savedLanguage) {
i18n.changeLanguage(savedLanguage);
}
} catch (error) {
console.error('加载语言设置失败:', error);
}
};
// 保存语言设置到本地存储
const saveLanguage = async (language: string) => {
try {
await AsyncStorage.setItem(LANGUAGE_KEY, language);
} catch (error) {
console.error('保存语言设置失败:', error);
}
};
// 修改语言切换函数
export const changeLanguage = async (language: string) => {
await saveLanguage(language);
i18n.changeLanguage(language);
console.log("切换语言:" + language);
};
// 初始化时加载语言设置
loadLanguage();
// 创建全局翻译函数
const t = (key: string, options?: any): string => {
return i18n.t(key, options) as string;
};
// 导出全局翻译函数
export { t };
export const getCurrentLanguage = () => {
return i18n.language;
};
export default i18n;
// const resources = {
// en: {
// translation: {
// selectCountry: 'Select your country',
// subtitle: 'You can change the country & language in your profile settings anytime.',
// welcomeTitle: 'Welcome!',
// welcomeMessage: 'Thank you for choosing your country. You can now log in and use the app.',
// loginNow: 'Log in now',
// mainAppTitle: 'Welcome to MainApp',
// mainAppText: 'This is the main application screen.',
// resetCountry: 'Reset Country Selection',
// loginTitle: 'Login For brainnel',
// loginSubtitle: 'Login to start your business',
// continueWithGoogle: 'Continue with Google',
// continueWithFacebook: 'Continue with Facebook',
// continueWithApple: 'Continue with Apple',
// continueWithInstagram: 'Continue with Instagram',
// continueWithEmail: 'Continue with Email',
// continueWithPhone: 'Continue with phone number',
// orContinueWith: 'Or continue with',
// instagram: 'Instagram',
// email: 'Email',
// phone: 'Phone',
// forgotPassword: 'Forget your password?',
// termsText: 'By continuing, you agree to our',
// termsOfUse: 'Terms of Use',
// and: 'and',
// privacyPolicy: 'Privacy Policy',
// wholesalePrice: 'Wholesale price',
// fastShipping: 'Fast shipping',
// // Home Screen
// shipping: 'Shipping',
// quote: 'Quote',
// tiktok: 'TikTok',
// howToBuy: 'How to Buy',
// all: 'All',
// electronics: 'Electronics',
// clothing: 'Clothing',
// home: 'Home',
// beauty: 'Beauty',
// kids: 'Kids',
// // Phone login screen
// logInOrSignUp: 'Log in or sign up',
// phoneNumber: 'Phone number',
// enterPassword: 'Please re-enter your password',
// passwordIncorrect: 'Password incorrect, please confirm your password.',
// verificationCodeInfo: 'We will send a verification code on your number to confirm it\'s you.',
// continue: 'Continue',
// // Email login screen
// pleaseEnterEmail: 'Please enter your e-mail address',
// // Search Result Screen
// searchProducts: 'Search products',
// priceRange: 'Price range',
// minPrice: 'Min price',
// maxPrice: 'Max price',
// reset: 'Reset',
// apply: 'Apply',
// price: 'Price',
// lowToHigh: 'Low to high',
// highToLow: 'High to low',
// time: 'Time',
// oldest: 'Oldest',
// newest: 'Newest',
// noResults: 'No results found for',
// tryDifferentKeywords: 'Try using different keywords or check your spelling',
// loadingMore: 'Loading more...',
// noMoreData: 'No more data',
// monthlySales: 'ventes',
// // Search Screen
// search: 'Search',
// searchPlaceholder: 'Search products',
// cancel: 'Cancel',
// searchHistory: 'Search History',
// hotSearch: 'Hot Search',
// noRecentSearches: 'You have not recent searches',
// headphones: 'Headphones',
// computer: 'Computer',
// tablet: 'Tablet',
// watch: 'Watch',
// camera: 'Camera',
// homeAppliance: 'Home Appliance',
// food: 'Food',
// // Popular search terms
// summerWomenClothes: 'Summer women clothes',
// plusSizeWomen: 'Plus size women',
// sexyUnderwear: 'Sexy underwear',
// homeDecor: 'Home decor',
// unusualToys: 'Unusual toys',
// // Product Detail Screen
// productDetail: 'Product Detail',
// addToCart: 'Add to Cart',
// buyNow: 'Buy Now',
// color: 'Color',
// size: 'Size',
// moreFromStore: 'More from this Store',
// viewAll: 'View All',
// loadingProductInfo: 'Loading product information...',
// productNotAvailable: 'Product is not available or has been removed',
// customerService: 'Customer Service',
// productDetails: 'Product Details',
// loadingMoreProducts: 'Loading more products...',
// noMoreProducts: 'No more products',
// chatNow: 'Chat Now',
// popularCategories: 'Popular Categories',
// },
// },
// fr: {
// translation: {
// selectCountry: 'Sélectionnez votre pays',
// subtitle: 'Vous pouvez modifier le pays et la langue dans les paramètres de votre profil à tout moment.',
// welcomeTitle: 'Bienvenue!',
// welcomeMessage: 'Merci d\'avoir choisi votre pays. Vous pouvez maintenant vous connecter et utiliser l\'application.',
// loginNow: 'Se connecter maintenant',
// mainAppTitle: 'Bienvenue sur MainApp',
// mainAppText: 'Ceci est l\'écran principal de l\'application.',
// resetCountry: 'Réinitialiser la sélection du pays',
// loginTitle: 'Connexion à brainnel',
// loginSubtitle: 'Connectez-vous pour démarrer votre entreprise',
// continueWithGoogle: 'Continuer avec Google',
// continueWithFacebook: 'Continuer avec Facebook',
// continueWithApple: 'Continuer avec Apple',
// continueWithInstagram: 'Continuer avec Instagram',
// continueWithEmail: 'Continuer avec Email',
// continueWithPhone: 'Continuer avec numéro de téléphone',
// orContinueWith: 'Ou continuer avec',
// instagram: 'Instagram',
// email: 'Email',
// phone: 'Téléphone',
// forgotPassword: 'Mot de passe oublié?',
// termsText: 'En continuant, vous acceptez nos',
// termsOfUse: 'Conditions d\'utilisation',
// and: 'et',
// privacyPolicy: 'Politique de confidentialité',
// wholesalePrice: 'Prix de gros',
// fastShipping: 'Livraison rapide',
// // Home Screen
// shipping: 'Expédition',
// quote: 'Devis',
// tiktok: 'TikTok',
// howToBuy: 'Comment acheter',
// all: 'Tous',
// electronics: 'Électronique',
// clothing: 'Vêtements',
// home: 'Maison',
// beauty: 'Beauté',
// kids: 'Enfants',
// // Phone login screen
// logInOrSignUp: 'Se connecter ou s\'inscrire',
// phoneNumber: 'Numéro de téléphone',
// enterPassword: 'Veuillez saisir à nouveau votre mot de passe',
// passwordIncorrect: 'Mot de passe incorrect, veuillez confirmer votre mot de passe.',
// verificationCodeInfo: 'Nous vous enverrons un code de vérification sur votre numéro pour confirmer que c\'est bien vous.',
// continue: 'Continuer',
// // Email login screen
// pleaseEnterEmail: 'Veuillez entrer votre adresse e-mail',
// // Search Result Screen
// searchProducts: 'Rechercher des produits',
// priceRange: 'Gamme de prix',
// minPrice: 'Prix minimum',
// maxPrice: 'Prix maximum',
// reset: 'Réinitialiser',
// apply: 'Appliquer',
// price: 'Prix',
// lowToHigh: 'Bas à élevé',
// highToLow: 'Élevé à bas',
// time: 'Temps',
// oldest: 'Plus ancien',
// newest: 'Plus récent',
// noResults: 'Aucun résultat trouvé pour',
// tryDifferentKeywords: 'Essayez d\'utiliser des mots-clés différents ou vérifiez votre orthographe',
// loadingMore: 'Chargement...',
// noMoreData: 'Plus de données',
// monthlySales: 'Ventes mensuelles',
// // Search Screen
// search: 'Rechercher',
// searchPlaceholder: 'Recherche',
// cancel: 'Annuler',
// searchHistory: 'Recherches récentes',
// hotSearch: 'Populaires en ce moment',
// noRecentSearches: 'Vous n\'avez pas de recherches récentes',
// headphones: 'Écouteurs',
// computer: 'Ordinateur',
// tablet: 'Tablette',
// watch: 'Montre',
// camera: 'Appareil photo',
// homeAppliance: 'Électroménager',
// food: 'Alimentation',
// // Popular search terms
// summerWomenClothes: 'Vêtements d\'été femmes',
// plusSizeWomen: 'Grande taille femmes',
// sexyUnderwear: 'Sous vêtements hot',
// homeDecor: 'Objet déco salon',
// unusualToys: 'Jouet insolite',
// // Product Detail Screen
// productDetail: 'Détail du Produit',
// addToCart: 'Ajouter au Panier',
// buyNow: 'Acheter Maintenant',
// color: 'Couleur',
// size: 'Taille',
// moreFromStore: 'Plus de ce Magasin',
// viewAll: 'Voir Tout',
// loadingProductInfo: 'Chargement des informations produit...',
// productNotAvailable: 'Le produit n\'est pas disponible ou a été supprimé',
// customerService: 'Service Client',
// productDetails: 'Détails du Produit',
// loadingMoreProducts: 'Chargement de plus de produits...',
// noMoreProducts: 'Plus de produits',
// chatNow: 'Discuter',
// popularCategories: 'Catégories populaires',
// },
// },
// zh: {
// translation: {
// // Home Screen
// searchProducts: '搜索商品',
// shipping: '运输',
// quote: '报价',
// tiktok: '抖音',
// howToBuy: '如何购买',
// all: '全部',
// electronics: '电子产品',
// clothing: '服装',
// home: '家居',
// beauty: '美妆',
// kids: '儿童',
// // Search Result Screen
// priceRange: '价格范围',
// minPrice: '最低价',
// maxPrice: '最高价',
// reset: '重置',
// apply: '应用',
// price: '价格',
// lowToHigh: '低到高',
// highToLow: '高到低',
// time: '时间',
// oldest: '最早',
// newest: '最新',
// noResults: '未找到搜索结果',
// tryDifferentKeywords: '尝试使用不同的关键词或检查拼写',
// loadingMore: '正在加载更多...',
// noMoreData: '没有更多数据了',
// monthlySales: '月销量',
// // Search Screen
// search: '搜索',
// searchPlaceholder: '搜索商品',
// cancel: '取消',
// searchHistory: '历史搜索',
// hotSearch: '热门搜索',
// noRecentSearches: '暂无搜索记录',
// phone: '手机',
// headphones: '耳机',
// computer: '电脑',
// tablet: '平板',
// watch: '手表',
// camera: '相机',
// homeAppliance: '家电',
// food: '食品',
// // Popular search terms
// summerWomenClothes: '女士夏装',
// plusSizeWomen: '女士大码',
// sexyUnderwear: '性感内衣',
// homeDecor: '家居装饰',
// unusualToys: '奇特玩具',
// // Product Detail Screen
// productDetail: '商品详情',
// addToCart: '加入购物车',
// buyNow: '立即购买',
// color: '颜色',
// size: '尺寸',
// moreFromStore: '来自此店铺的更多商品',
// viewAll: '查看全部',
// loadingProductInfo: '加载商品信息...',
// productNotAvailable: '商品不存在或已下架',
// customerService: '客服',
// productDetails: '产品详情',
// loadingMoreProducts: '正在加载更多产品...',
// noMoreProducts: '没有更多产品了',
// chatNow: '立即聊天',
// popularCategories: '热门分类',
// }
// }
// };
// const getDefaultLanguage = () => {
// const locale = Localization.locale;
// const languageCode = locale.split('-')[0]; // Get the language code part
// return languageCode === 'fr' ? 'fr' : 'en';
// };
// i18n
// .use(initReactI18next)
// .init({
// resources,
// lng: getDefaultLanguage(),
// fallbackLng: 'en',
// interpolation: {
// escapeValue: false,
// },
// });
// export default i18n;

2
app/screens/MainApp.tsx

@ -12,7 +12,6 @@ import {
BackHandler,
} from 'react-native';
import Constants from 'expo-constants';
import { useTranslation } from 'react-i18next';
import AsyncStorage from '@react-native-async-storage/async-storage';
import { useNavigation } from '@react-navigation/native';
import { NativeStackNavigationProp } from '@react-navigation/native-stack';
@ -26,7 +25,6 @@ type MainAppScreenNavigationProp = NativeStackNavigationProp<
const MODAL_HEIGHT = 280; // 估计的模态框高度
export const MainApp = () => {
const { t } = useTranslation();
const navigation = useNavigation<MainAppScreenNavigationProp>();
const [modalVisible, setModalVisible] = useState(true);
const [slideAnim] = useState(new Animated.Value(MODAL_HEIGHT));

57
app/screens/Recipient/ConfirmOrder.tsx

@ -1,4 +1,4 @@
import React, { useEffect, useState } from 'react';
import React, { useEffect, useState } from 'react';
import {
View,
Text,
@ -14,13 +14,24 @@ import useOrderStore from '../../store/order';
import widthUtils from '../../utils/widthUtils';
import { ordersApi } from '../../services/api/orders';
import { Order } from '../../services/api/orders';
import { t } from '../../i18n';
interface OrderStore {
order: any;
payment_operator?: string;
shipping?: {
method: string;
estimated_arrival: string;
};
}
export function ConfirmOrder() {
const navigation = useNavigation<NativeStackNavigationProp<any>>();
const orderInfo = useOrderStore();
const orderInfo = useOrderStore() as unknown as OrderStore;
const [order, setOrder] = useState<Order>();
const getOrder = async () => {
const data = orderInfo.order
const data = orderInfo.order;
try {
const response = await ordersApi.createOrder(data);
console.log(response);
@ -30,11 +41,11 @@ export function ConfirmOrder() {
console.error('创建订单失败:', error);
alert('创建订单失败,请重试');
}
}
};
useEffect(() => {
getOrder()
},[])
getOrder();
}, []);
return (
<View style={styles.mainContainer}>
@ -44,14 +55,14 @@ export function ConfirmOrder() {
<TouchableOpacity onPress={() => navigation.goBack()}>
<BackIcon size={20} />
</TouchableOpacity>
<Text style={styles.title}></Text>
<Text style={styles.title}>{t('confirmOrder.title')}</Text>
</View>
{/* Order Number */}
<View style={styles.section}>
<View style={styles.sectionHeader}>
<Text style={styles.sectionIcon}>📋</Text>
<Text style={styles.sectionTitle}></Text>
<Text style={styles.sectionTitle}>{t('confirmOrder.orderNumber')}</Text>
</View>
<Text style={styles.orderNumber}>{order?.order_no}</Text>
</View>
@ -61,7 +72,7 @@ export function ConfirmOrder() {
<View style={styles.section}>
<View style={styles.sectionHeader}>
<Text style={styles.sectionIcon}>💳</Text>
<Text style={styles.sectionTitle}></Text>
<Text style={styles.sectionTitle}>{t('confirmOrder.paymentMethod')}</Text>
</View>
<View style={styles.paymentInfo}>
<Text style={styles.paymentMethod}>{order?.payment_method}</Text>
@ -74,17 +85,17 @@ export function ConfirmOrder() {
<View style={styles.section}>
<View style={styles.sectionHeader}>
<Text style={styles.sectionIcon}>🚢</Text>
<Text style={styles.sectionTitle}></Text>
<Text style={styles.sectionTitle}>{t('confirmOrder.shippingInfo')}</Text>
</View>
<View style={styles.shippingInfo}>
<View style={styles.shippingRow}>
<Text style={styles.shippingLabel}></Text>
<Text style={styles.shippingLabel}>{t('confirmOrder.shippingMethod')}</Text>
<Text style={styles.shippingValue}>
{orderInfo?.shipping?.method === 'sea' ? '海运' : '空运'}
{orderInfo?.shipping?.method === 'sea' ? t('confirmOrder.seaShipping') : t('confirmOrder.airShipping')}
</Text>
</View>
<View style={styles.shippingRow}>
<Text style={styles.shippingLabel}></Text>
<Text style={styles.shippingLabel}>{t('confirmOrder.estimatedArrival')}</Text>
<Text style={styles.shippingValue}>{orderInfo?.shipping?.estimated_arrival}</Text>
</View>
</View>
@ -109,7 +120,7 @@ export function ConfirmOrder() {
<View style={styles.section}>
<View style={styles.sectionHeader}>
<Text style={styles.sectionIcon}>📦</Text>
<Text style={styles.sectionTitle}></Text>
<Text style={styles.sectionTitle}>{t('confirmOrder.orderItems')}</Text>
</View>
<View style={styles.orderItems}>
{order?.items?.map((item) => (
@ -119,8 +130,7 @@ export function ConfirmOrder() {
{item.product_name}
</Text>
{item.sku_attributes.map((attr) => (
<Text key={attr.attribute_name
} style={styles.itemAttribute}>
<Text key={attr.attribute_name} style={styles.itemAttribute}>
{attr.attribute_name}: {attr.value}
</Text>
))}
@ -139,28 +149,31 @@ export function ConfirmOrder() {
<View style={styles.section}>
<View style={styles.priceSummary}>
<View style={styles.priceRow}>
<Text style={styles.priceLabel}></Text>
<Text style={styles.priceLabel}>{t('confirmOrder.totalPrice')}</Text>
<Text style={styles.priceValue}>${order?.total_amount}</Text>
</View>
<View style={styles.priceRow}>
<Text style={styles.priceLabel}></Text>
<Text style={styles.priceLabel}>{t('confirmOrder.domesticShipping')}</Text>
<Text style={styles.priceValue}>${order?.discount_amount}</Text>
</View>
<View style={styles.priceRow}>
<Text style={styles.priceLabel}></Text>
<Text style={styles.priceLabel}>{t('confirmOrder.internationalShipping')}</Text>
<Text style={styles.priceValue}>${order?.shipping_fee}</Text>
</View>
<View style={[styles.priceRow, styles.totalRow]}>
<Text style={styles.totalLabel}></Text>
<Text style={styles.totalLabel}>{t('confirmOrder.actualAmount')}</Text>
<Text style={styles.totalAmount}>${order?.actual_amount}</Text>
</View>
</View>
</View>
{/* Bottom Button */}
<TouchableOpacity style={styles.bottomButton} onPress={() => navigation.navigate('Pay',{order_id:order?.order_id})}>
<TouchableOpacity
style={styles.bottomButton}
onPress={() => navigation.navigate('Pay', { order_id: order?.order_id })}
>
<View style={styles.bottomButtonContent}>
<Text style={styles.bottomButtonText}></Text>
<Text style={styles.bottomButtonText}>{t('confirmOrder.payNow')}</Text>
</View>
</TouchableOpacity>
</ScrollView>

17
app/screens/setting/CountrySetting.tsx

@ -11,6 +11,8 @@ import flagMap from "../../utils/flagMap";
import CheckIcon from "../../components/CheckIcon";
import Toast from "react-native-toast-message";
import { eventBus } from "../../utils/eventBus";
import { changeLanguage } from "../../i18n";
import { t } from "../../i18n";
export const CountrySetting = () => {
const navigation =
@ -54,11 +56,14 @@ export const CountrySetting = () => {
language: language,
};
Toast.show({
text1: "设置成功",
text1: t('setting.success'),
type: "success",
visibilityTime: 1000,
});
await settingApi.putSetting(data);
if (language) {
await changeLanguage(language);
}
eventBus.emit("refreshSetting");
};
@ -71,7 +76,7 @@ export const CountrySetting = () => {
>
<BackIcon size={fontSize(24)} />
</TouchableOpacity>
<Text style={styles.title}></Text>
<Text style={styles.title}>{t('setting.title')}</Text>
<View style={styles.placeholder} />
</View>
<View style={styles.changeType}>
@ -82,7 +87,7 @@ export const CountrySetting = () => {
]}
onPress={() => setChangeType("country")}
>
<Text style={styles.changeTypeTextTitle}></Text>
<Text style={styles.changeTypeTextTitle}>{t('setting.country')}</Text>
</TouchableOpacity>
<TouchableOpacity
style={[
@ -91,7 +96,7 @@ export const CountrySetting = () => {
]}
onPress={() => setChangeType("currency")}
>
<Text style={styles.changeTypeTextTitle}></Text>
<Text style={styles.changeTypeTextTitle}>{t('setting.currency')}</Text>
</TouchableOpacity>
<TouchableOpacity
style={[
@ -100,7 +105,7 @@ export const CountrySetting = () => {
]}
onPress={() => setChangeType("language")}
>
<Text style={styles.changeTypeTextTitle}></Text>
<Text style={styles.changeTypeTextTitle}>{t('setting.language')}</Text>
</TouchableOpacity>
</View>
{changeType === "country" && (
@ -188,7 +193,7 @@ export const CountrySetting = () => {
</View>
)}
<TouchableOpacity style={styles.bottomButton} onPress={putSettinghandel}>
<Text style={styles.buttonText}></Text>
<Text style={styles.buttonText}>{t('setting.confirm')}</Text>
</TouchableOpacity>
</View>
);

5
app/screens/setting/SettingList.tsx

@ -13,6 +13,7 @@ export const SettingList = () => {
const [mySetting, setMySetting] = useState<MySetting>();
const getMySetting = async () => {
const res = await settingApi.getMySetting()
console.log("MySetting:");
console.log(res);
setMySetting(res);
}
@ -95,9 +96,9 @@ export const SettingList = () => {
<View>
<TouchableOpacity
onPress={() => {
if (mySetting?.language && mySetting?.currency) {
// if (mySetting?.language && mySetting?.currency) {
navigation.navigate("CountrySetting", { mySetting });
}
// }
}}
style={styles.item}
>

1236
yarn.lock

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save