add register, account, article, update navigation
This commit is contained in:
@@ -14,6 +14,11 @@ import ProductDetail from '../screens/ProductDetail';
|
||||
import Cart from '../screens/Cart';
|
||||
import Login from '../screens/Login';
|
||||
import ProductSearch from '../screens/ProductSearch';
|
||||
import Register from '../screens/Register';
|
||||
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'
|
||||
|
||||
|
||||
@@ -207,6 +212,30 @@ function LoginNavigation() {
|
||||
);
|
||||
}
|
||||
|
||||
const RegisterStack = createStackNavigator();
|
||||
|
||||
function RegisterNavigation() {
|
||||
return (
|
||||
<RegisterStack.Navigator>
|
||||
<RegisterStack.Screen
|
||||
name="Register"
|
||||
component={Register}
|
||||
options={{
|
||||
headerTitle: '',
|
||||
headerLeft: () => (
|
||||
<HeaderAllOtherPage headerTitle={'Đăng ký'} />
|
||||
),
|
||||
headerStyle: {
|
||||
backgroundColor: '#fff',
|
||||
height: 80,
|
||||
}
|
||||
}}
|
||||
/>
|
||||
</RegisterStack.Navigator>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
const ProductSearchStack = createStackNavigator();
|
||||
|
||||
function ProductSearchNavigation() {
|
||||
@@ -230,6 +259,99 @@ function ProductSearchNavigation() {
|
||||
);
|
||||
}
|
||||
|
||||
const ArticleHomeStack = createStackNavigator();
|
||||
|
||||
function ArticleHomeNavigation() {
|
||||
return (
|
||||
<ArticleHomeStack.Navigator>
|
||||
<ArticleHomeStack.Screen
|
||||
name="ArticleHome"
|
||||
component={ArticleHome}
|
||||
options={{
|
||||
headerTitle: '',
|
||||
headerLeft: () => (
|
||||
<HeaderAllOtherPage headerTitle={'Tin tức'} />
|
||||
),
|
||||
headerStyle: {
|
||||
backgroundColor: '#fff',
|
||||
height: 80,
|
||||
}
|
||||
}}
|
||||
/>
|
||||
</ArticleHomeStack.Navigator>
|
||||
);
|
||||
}
|
||||
|
||||
const ArticleListStack = createStackNavigator();
|
||||
|
||||
function ArticleListNavigation() {
|
||||
return (
|
||||
<ArticleListStack.Navigator>
|
||||
<ArticleListStack.Screen
|
||||
name="ArticleList"
|
||||
component={ArticleList}
|
||||
options={{
|
||||
headerTitle: '',
|
||||
headerLeft: () => (
|
||||
<HeaderAllOtherPage headerTitle={'Tin tức'} />
|
||||
),
|
||||
headerStyle: {
|
||||
backgroundColor: '#fff',
|
||||
height: 80,
|
||||
}
|
||||
}}
|
||||
/>
|
||||
</ArticleListStack.Navigator>
|
||||
);
|
||||
}
|
||||
|
||||
const ArticleDetailStack = createStackNavigator();
|
||||
|
||||
function ArticleDetailNavigation() {
|
||||
return (
|
||||
<ArticleDetailStack.Navigator>
|
||||
<ArticleDetailStack.Screen
|
||||
name="ArticleDetail"
|
||||
component={ArticleDetail}
|
||||
options={{
|
||||
headerTitle: '',
|
||||
headerLeft: () => (
|
||||
<HeaderAllOtherPage headerTitle={'Tin tức'} />
|
||||
),
|
||||
headerStyle: {
|
||||
backgroundColor: '#fff',
|
||||
height: 80,
|
||||
}
|
||||
}}
|
||||
/>
|
||||
</ArticleDetailStack.Navigator>
|
||||
);
|
||||
}
|
||||
|
||||
const AccountHomeStack = createStackNavigator();
|
||||
|
||||
function AccountHomeNavigation() {
|
||||
return (
|
||||
<AccountHomeStack.Navigator>
|
||||
<AccountHomeStack.Screen
|
||||
name="AccountHome"
|
||||
component={AccountHome}
|
||||
options={{
|
||||
headerTitle: '',
|
||||
headerLeft: () => (
|
||||
<HeaderAllOtherPage headerTitle={'Tài khoản'} />
|
||||
),
|
||||
headerStyle: {
|
||||
backgroundColor: '#fff',
|
||||
height: 80,
|
||||
}
|
||||
}}
|
||||
/>
|
||||
</AccountHomeStack.Navigator>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
const AllStack = createStackNavigator();
|
||||
function AllStackNavigation() {
|
||||
return (
|
||||
@@ -269,6 +391,31 @@ function AllStackNavigation() {
|
||||
component={ProductSearchNavigation}
|
||||
options={{ headerShown: false }}
|
||||
/>
|
||||
<AllStack.Screen
|
||||
name="Register"
|
||||
component={RegisterNavigation}
|
||||
options={{ headerShown: false }}
|
||||
/>
|
||||
<AllStack.Screen
|
||||
name="ArticleHome"
|
||||
component={ArticleHomeNavigation}
|
||||
options={{ headerShown: false }}
|
||||
/>
|
||||
<AllStack.Screen
|
||||
name="ArticleList"
|
||||
component={ArticleListNavigation}
|
||||
options={{ headerShown: false }}
|
||||
/>
|
||||
<AllStack.Screen
|
||||
name="ArticleDetail"
|
||||
component={ArticleDetailNavigation}
|
||||
options={{ headerShown: false }}
|
||||
/>
|
||||
<AllStack.Screen
|
||||
name="AccountHome"
|
||||
component={AccountHomeNavigation}
|
||||
options={{ headerShown: false }}
|
||||
/>
|
||||
</AllStack.Navigator>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user