them cac trang cart, tai khoan
This commit is contained in:
@@ -9,6 +9,7 @@ import Colors from '../constants/Colors';
|
||||
import useColorScheme from '../hooks/useColorScheme';
|
||||
import HomePage from '../screens/HomePage';
|
||||
import ProductList from '../screens/ProductList';
|
||||
import ProductHotList from '../screens/ProductHotList';
|
||||
import MenuCategory from '../screens/MenuCategory';
|
||||
import ProductDetail from '../screens/ProductDetail';
|
||||
import Cart from '../screens/Cart';
|
||||
@@ -19,7 +20,20 @@ import ArticleHome from '../screens/ArticleHome';
|
||||
import ArticleList from '../screens/ArticleList';
|
||||
import ArticleDetail from '../screens/ArticleDetail';
|
||||
import AccountHome from '../screens/AccountHome';
|
||||
import { HeaderHome, HeaderCategory, HeaderProductDetail, HeaderAllOtherPage } from '../components/header/HeaderAllPage'
|
||||
import ForgotPassword from '../screens/ForgotPassword';
|
||||
import CartStep from '../screens/CartStep';
|
||||
import CartPayInstallment from '../screens/CartPayInstallment';
|
||||
import AccountIndex from '../screens/AccountIndex';
|
||||
import SettingAccount from '../screens/SettingAccount';
|
||||
import AccountOrderList from '../screens/AccountOrderList';
|
||||
import AccountOrderDetail from '../screens/AccountOrderDetail';
|
||||
import AccountProductBought from '../screens/AccountProductBought';
|
||||
import AccountProductViewHistory from '../screens/AccountProductViewHistory';
|
||||
import AccountProductFavorite from '../screens/AccountProductFavorite';
|
||||
import AccountProductSave from '../screens/AccountProductSave';
|
||||
import AccountCoin from '../screens/AccountCoin';
|
||||
import CustomerInfo from '../screens/CustomerInfo';
|
||||
import { HeaderHome, HeaderCategory, HeaderProductDetail, HeaderAllOtherPage, HeaderLogin } from '../components/header/HeaderAllPage'
|
||||
|
||||
|
||||
const BottomTab = createBottomTabNavigator();
|
||||
@@ -59,7 +73,7 @@ export default function BottomTabNavigator() {
|
||||
/>
|
||||
<BottomTab.Screen
|
||||
name="Tài khoản"
|
||||
component={LoginNavigation}
|
||||
component={AccountIndexNavigation}
|
||||
options={{
|
||||
tabBarIcon: ({ color }) => <TabBarIcon name="person-outline" color={color} />,
|
||||
}}
|
||||
@@ -174,10 +188,58 @@ function CartNavigation() {
|
||||
<CartStack.Screen
|
||||
name="Cart"
|
||||
component={Cart}
|
||||
options={{
|
||||
headerShown: false
|
||||
}}
|
||||
/>
|
||||
</CartStack.Navigator>
|
||||
);
|
||||
}
|
||||
|
||||
const CartStepStack = createStackNavigator();
|
||||
|
||||
function CartStepNavigation() {
|
||||
return (
|
||||
<CartStepStack.Navigator>
|
||||
<CartStepStack.Screen
|
||||
name="CartStep"
|
||||
component={CartStep}
|
||||
options={{
|
||||
headerShown: false
|
||||
}}
|
||||
/>
|
||||
</CartStepStack.Navigator>
|
||||
);
|
||||
}
|
||||
|
||||
const CartPayInstallmentStack = createStackNavigator();
|
||||
|
||||
function CartPayInstallmentNavigation() {
|
||||
return (
|
||||
<CartPayInstallmentStack.Navigator>
|
||||
<CartPayInstallmentStack.Screen
|
||||
name="CartPayInstallment"
|
||||
component={CartPayInstallment}
|
||||
options={{
|
||||
headerShown: false
|
||||
}}
|
||||
/>
|
||||
</CartPayInstallmentStack.Navigator>
|
||||
);
|
||||
}
|
||||
|
||||
const AccountIndexStack = createStackNavigator();
|
||||
|
||||
function AccountIndexNavigation() {
|
||||
return (
|
||||
<AccountIndexStack.Navigator>
|
||||
<AccountIndexStack.Screen
|
||||
name="AccountIndex"
|
||||
component={AccountIndex}
|
||||
options={{
|
||||
headerTitle: '',
|
||||
headerLeft: () => (
|
||||
<HeaderAllOtherPage headerTitle={'Giỏ hàng'} />
|
||||
<HeaderLogin headerTitle={'Đăng nhập'} />
|
||||
),
|
||||
headerStyle: {
|
||||
backgroundColor: '#fff',
|
||||
@@ -185,7 +247,7 @@ function CartNavigation() {
|
||||
}
|
||||
}}
|
||||
/>
|
||||
</CartStack.Navigator>
|
||||
</AccountIndexStack.Navigator>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -200,7 +262,7 @@ function LoginNavigation() {
|
||||
options={{
|
||||
headerTitle: '',
|
||||
headerLeft: () => (
|
||||
<HeaderAllOtherPage headerTitle={'Đăng nhập'} />
|
||||
<HeaderLogin headerTitle={'Đăng nhập'} />
|
||||
),
|
||||
headerStyle: {
|
||||
backgroundColor: '#fff',
|
||||
@@ -223,7 +285,7 @@ function RegisterNavigation() {
|
||||
options={{
|
||||
headerTitle: '',
|
||||
headerLeft: () => (
|
||||
<HeaderAllOtherPage headerTitle={'Đăng ký'} />
|
||||
<HeaderLogin headerTitle={'Đăng ký'} />
|
||||
),
|
||||
headerStyle: {
|
||||
backgroundColor: '#fff',
|
||||
@@ -351,6 +413,197 @@ function AccountHomeNavigation() {
|
||||
);
|
||||
}
|
||||
|
||||
const ProductHotListStack = createStackNavigator();
|
||||
|
||||
function ProductHotListNavigation() {
|
||||
return (
|
||||
<ProductHotListStack.Navigator>
|
||||
<ProductHotListStack.Screen
|
||||
name="ProductHotList"
|
||||
component={ProductHotList}
|
||||
options={{
|
||||
headerTitle: '',
|
||||
headerLeft: () => (
|
||||
<HeaderAllOtherPage headerTitle={'Sản phẩm nổi bật'} />
|
||||
),
|
||||
headerStyle: {
|
||||
backgroundColor: '#fff',
|
||||
height: 80,
|
||||
}
|
||||
}}
|
||||
/>
|
||||
</ProductHotListStack.Navigator>
|
||||
);
|
||||
}
|
||||
|
||||
const ForgotPasswordStack = createStackNavigator();
|
||||
|
||||
function ForgotPasswordNavigation() {
|
||||
return (
|
||||
<ForgotPasswordStack.Navigator>
|
||||
<ForgotPasswordStack.Screen
|
||||
name="ForgotPassword"
|
||||
component={ForgotPassword}
|
||||
options={{
|
||||
headerTitle: '',
|
||||
headerLeft: () => (
|
||||
<HeaderLogin headerTitle={'Đăng nhập'} />
|
||||
),
|
||||
headerStyle: {
|
||||
backgroundColor: '#fff',
|
||||
height: 80,
|
||||
}
|
||||
}}
|
||||
/>
|
||||
</ForgotPasswordStack.Navigator>
|
||||
);
|
||||
}
|
||||
|
||||
const SettingAccountStack = createStackNavigator();
|
||||
|
||||
function SettingAccountNavigation() {
|
||||
return (
|
||||
<SettingAccountStack.Navigator>
|
||||
<SettingAccountStack.Screen
|
||||
name="SettingAccount"
|
||||
component={SettingAccount}
|
||||
options={{
|
||||
headerShown: false
|
||||
}}
|
||||
/>
|
||||
</SettingAccountStack.Navigator>
|
||||
);
|
||||
}
|
||||
|
||||
const AccountOrderListStack = createStackNavigator();
|
||||
|
||||
function AccountOrderListNavigation() {
|
||||
return (
|
||||
<AccountOrderListStack.Navigator>
|
||||
<AccountOrderListStack.Screen
|
||||
name="AccountOrderList"
|
||||
component={AccountOrderList}
|
||||
options={{
|
||||
headerShown: false
|
||||
}}
|
||||
/>
|
||||
</AccountOrderListStack.Navigator>
|
||||
);
|
||||
}
|
||||
|
||||
const AccountOrderDetailStack = createStackNavigator();
|
||||
|
||||
function AccountOrderDetailNavigation() {
|
||||
return (
|
||||
<AccountOrderDetailStack.Navigator>
|
||||
<AccountOrderDetailStack.Screen
|
||||
name="AccountOrderDetail"
|
||||
component={AccountOrderDetail}
|
||||
options={{
|
||||
headerShown: false
|
||||
}}
|
||||
/>
|
||||
</AccountOrderDetailStack.Navigator>
|
||||
);
|
||||
}
|
||||
|
||||
const AccountProductBoughtStack = createStackNavigator();
|
||||
|
||||
function AccountProductBoughtNavigation() {
|
||||
return (
|
||||
<AccountProductBoughtStack.Navigator>
|
||||
<AccountProductBoughtStack.Screen
|
||||
name="AccountProductBought"
|
||||
component={AccountProductBought}
|
||||
options={{
|
||||
headerShown: false
|
||||
}}
|
||||
/>
|
||||
</AccountProductBoughtStack.Navigator>
|
||||
);
|
||||
}
|
||||
|
||||
const AccountProductViewHistoryStack = createStackNavigator();
|
||||
|
||||
function AccountProductViewHistoryNavigation() {
|
||||
return (
|
||||
<AccountProductViewHistoryStack.Navigator>
|
||||
<AccountProductViewHistoryStack.Screen
|
||||
name="AccountProductViewHistory"
|
||||
component={AccountProductViewHistory}
|
||||
options={{
|
||||
headerShown: false
|
||||
}}
|
||||
/>
|
||||
</AccountProductViewHistoryStack.Navigator>
|
||||
);
|
||||
}
|
||||
|
||||
const AccountProductFavoriteStack = createStackNavigator();
|
||||
|
||||
function AccountProductFavoriteNavigation() {
|
||||
return (
|
||||
<AccountProductFavoriteStack.Navigator>
|
||||
<AccountProductFavoriteStack.Screen
|
||||
name="AccountProductFavorite"
|
||||
component={AccountProductFavorite}
|
||||
options={{
|
||||
headerShown: false
|
||||
}}
|
||||
/>
|
||||
</AccountProductFavoriteStack.Navigator>
|
||||
);
|
||||
}
|
||||
|
||||
const AccountProductSaveStack = createStackNavigator();
|
||||
|
||||
function AccountProductSaveNavigation() {
|
||||
return (
|
||||
<AccountProductSaveStack.Navigator>
|
||||
<AccountProductSaveStack.Screen
|
||||
name="AccountProductSave"
|
||||
component={AccountProductSave}
|
||||
options={{
|
||||
headerShown: false
|
||||
}}
|
||||
/>
|
||||
</AccountProductSaveStack.Navigator>
|
||||
);
|
||||
}
|
||||
|
||||
const AccountCoinStack = createStackNavigator();
|
||||
|
||||
function AccountCoinNavigation() {
|
||||
return (
|
||||
<AccountCoinStack.Navigator>
|
||||
<AccountCoinStack.Screen
|
||||
name="AccountCoin"
|
||||
component={AccountCoin}
|
||||
options={{
|
||||
headerShown: false
|
||||
}}
|
||||
/>
|
||||
</AccountCoinStack.Navigator>
|
||||
);
|
||||
}
|
||||
|
||||
const CustomerInfoStack = createStackNavigator();
|
||||
|
||||
function CustomerInfoNavigation() {
|
||||
return (
|
||||
<CustomerInfoStack.Navigator>
|
||||
<CustomerInfoStack.Screen
|
||||
name="CustomerInfo"
|
||||
component={CustomerInfo}
|
||||
options={{
|
||||
headerShown: false
|
||||
}}
|
||||
/>
|
||||
</CustomerInfoStack.Navigator>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
const AllStack = createStackNavigator();
|
||||
function AllStackNavigation() {
|
||||
@@ -381,6 +634,16 @@ function AllStackNavigation() {
|
||||
component={CartNavigation}
|
||||
options={{ headerShown: false }}
|
||||
/>
|
||||
<AllStack.Screen
|
||||
name="CartStep"
|
||||
component={CartStepNavigation}
|
||||
options={{ headerShown: false }}
|
||||
/>
|
||||
<AllStack.Screen
|
||||
name="CartPayInstallment"
|
||||
component={CartPayInstallmentNavigation}
|
||||
options={{ headerShown: false }}
|
||||
/>
|
||||
<AllStack.Screen
|
||||
name="Login"
|
||||
component={LoginNavigation}
|
||||
@@ -416,6 +679,61 @@ function AllStackNavigation() {
|
||||
component={AccountHomeNavigation}
|
||||
options={{ headerShown: false }}
|
||||
/>
|
||||
<AllStack.Screen
|
||||
name="AccountIndex"
|
||||
component={AccountIndexNavigation}
|
||||
options={{ headerShown: false }}
|
||||
/>
|
||||
<AllStack.Screen
|
||||
name="ForgotPassword"
|
||||
component={ForgotPasswordNavigation}
|
||||
options={{ headerShown: false }}
|
||||
/>
|
||||
<AllStack.Screen
|
||||
name="SettingAccount"
|
||||
component={SettingAccountNavigation}
|
||||
options={{ headerShown: false }}
|
||||
/>
|
||||
<AllStack.Screen
|
||||
name="AccountOrderList"
|
||||
component={AccountOrderListNavigation}
|
||||
options={{ headerShown: false }}
|
||||
/>
|
||||
<AllStack.Screen
|
||||
name="AccountOrderDetail"
|
||||
component={AccountOrderDetailNavigation}
|
||||
options={{ headerShown: false }}
|
||||
/>
|
||||
<AllStack.Screen
|
||||
name="AccountProductBought"
|
||||
component={AccountProductBoughtNavigation}
|
||||
options={{ headerShown: false }}
|
||||
/>
|
||||
<AllStack.Screen
|
||||
name="AccountProductViewHistory"
|
||||
component={AccountProductViewHistoryNavigation}
|
||||
options={{ headerShown: false }}
|
||||
/>
|
||||
<AllStack.Screen
|
||||
name="AccountProductFavorite"
|
||||
component={AccountProductFavoriteNavigation}
|
||||
options={{ headerShown: false }}
|
||||
/>
|
||||
<AllStack.Screen
|
||||
name="AccountProductSave"
|
||||
component={AccountProductSaveNavigation}
|
||||
options={{ headerShown: false }}
|
||||
/>
|
||||
<AllStack.Screen
|
||||
name="AccountCoin"
|
||||
component={AccountCoinNavigation}
|
||||
options={{ headerShown: false }}
|
||||
/>
|
||||
<AllStack.Screen
|
||||
name="CustomerInfo"
|
||||
component={CustomerInfoNavigation}
|
||||
options={{ headerShown: false }}
|
||||
/>
|
||||
</AllStack.Navigator>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user