@@ -13,6 +13,9 @@ import config from './_config'
1313import authService from './_services/authService'
1414import { useAppState , useAppStateMethods } from './_state/appState'
1515
16+ import AppRoute from './AppRoute'
17+ import DashboardLayout from '_layouts/DashboardLayout'
18+
1619// Import application modules
1720import Sales from './SalesModule'
1821import Content from './ContentModule'
@@ -41,13 +44,13 @@ const LoggedInRouter = () => {
4144 return (
4245 < Switch >
4346 < Route exact path = "/" render = { ( ) => < Redirect to = "/sales/dashboard" /> } />
44- < Route path = { `/sales` } component = { Sales } />
45- < Route path = { `/content` } component = { Content } />
46- < Route path = { `/admin` } component = { Admin } />
47- < Route path = { `/profile` } component = { Profile } />
48- < Route path = { `/account` } component = { Organization } />
49- < Route path = { `/demo` } component = { Demo } />
50- < Route component = { NotFound } />
47+ < AppRoute path = { `/sales` } component = { Sales } layout = { DashboardLayout } />
48+ < AppRoute path = { `/content` } component = { Content } layout = { DashboardLayout } />
49+ < AppRoute path = { `/admin` } component = { Admin } layout = { DashboardLayout } />
50+ < AppRoute path = { `/profile` } component = { Profile } layout = { DashboardLayout } />
51+ < AppRoute path = { `/account` } component = { Organization } layout = { DashboardLayout } />
52+ < AppRoute path = { `/demo` } component = { Demo } layout = { DashboardLayout } />
53+ < AppRoute component = { NotFound } layout = { DashboardLayout } />
5154 </ Switch >
5255 )
5356}
@@ -58,8 +61,10 @@ const AppRouterComponent: React.ComponentType<any> =
5861
5962const AppRouter : React . FC = ( ) => (
6063 < AppRouterComponent >
61- < Route path = "/auth" component = { Auth } />
62- < PrivateRoute path = "/" component = { LoggedInRouter } />
64+ < Switch >
65+ < Route path = "/auth" component = { Auth } />
66+ < PrivateRoute path = "/" component = { LoggedInRouter } />
67+ </ Switch >
6368 </ AppRouterComponent >
6469)
6570
0 commit comments