56 lines
1.5 KiB
TypeScript
56 lines
1.5 KiB
TypeScript
import { IonIcon, IonLabel, IonRouterOutlet, IonTabBar, IonTabButton, IonTabs } from '@ionic/react';
|
|
|
|
import { cloudOutline, searchOutline } from 'ionicons/icons';
|
|
import { Route, Redirect } from 'react-router';
|
|
|
|
import Tab1 from './AppPages/Tab1';
|
|
import Tab2 from './AppPages/Tab2';
|
|
|
|
import './style.scss';
|
|
import Home from './pages/Home';
|
|
import FavouriteProducts from './pages/FavouriteProducts';
|
|
import CartProducts from './pages/CartProducts';
|
|
import CategoryProducts from './pages/CategoryProducts';
|
|
import Product from './pages/Product';
|
|
|
|
function DemoFastFoodApp() {
|
|
return (
|
|
<IonTabs>
|
|
<IonRouterOutlet>
|
|
{/*
|
|
<Route exact path="/demo-fast-food-app/tab1">
|
|
<Tab1 />
|
|
</Route>
|
|
<Route exact path="/demo-fast-food-app/tab2">
|
|
<Tab2 />
|
|
</Route>
|
|
*/}
|
|
|
|
<Route path="/demo-fast-food-app/home" exact={true}>
|
|
<Home />
|
|
</Route>
|
|
|
|
<Route path="/demo-fast-food-app/favourites" exact>
|
|
<FavouriteProducts />
|
|
</Route>
|
|
|
|
<Route path="/demo-fast-food-app/cart" exact>
|
|
<CartProducts />
|
|
</Route>
|
|
|
|
<Route path="/demo-fast-food-app/category/:slug" exact>
|
|
<CategoryProducts />
|
|
</Route>
|
|
|
|
<Route path="/demo-fast-food-app/category/:slug/:id" exact>
|
|
<Product />
|
|
</Route>
|
|
|
|
<Redirect exact path="/demo-fast-food-app" to="/demo-fast-food-app/home" />
|
|
</IonRouterOutlet>
|
|
</IonTabs>
|
|
);
|
|
}
|
|
|
|
export default DemoFastFoodApp;
|