Update routing

This commit is contained in:
Moe Poi ~ 2022-05-21 17:11:27 +07:00
parent 9f9b9aabf4
commit 8bddd57d19
2 changed files with 3 additions and 3 deletions

View file

@ -71,13 +71,13 @@ class _MenuState extends State<Menu> {
}
});
} else if (index == 1) {
html.window.history.pushState(null, '', '/products');
html.window.history.pushState(null, '', '/#/products');
_selectedWidget = const Products();
} else if (index == 2) {
html.window.history.pushState(null, '', '');
_selectedWidget = const Home();
} else if (index == 3) {
html.window.history.pushState(null, '', '/cart');
html.window.history.pushState(null, '', '/#/cart');
_selectedWidget = const Cart();
} else if (index == 4) {
checkSessionExist().then((isLoggedIn) {

View file

@ -20,7 +20,7 @@ class NavigationAuth extends StatelessWidget {
if (data) {
return route;
} else {
html.window.history.pushState(null, '', '/login');
html.window.history.pushState(null, '', '/#/login');
return const Login();
}
} else {