Start porting over the admin area to react
This commit is contained in:
parent
dbb6f69e00
commit
9ee3275b11
6 changed files with 235 additions and 36 deletions
16
resources/scripts/routers/AdminRouter.tsx
Normal file
16
resources/scripts/routers/AdminRouter.tsx
Normal file
|
@ -0,0 +1,16 @@
|
|||
import React from 'react';
|
||||
import { Route, RouteComponentProps, Switch } from 'react-router-dom';
|
||||
import TransitionRouter from '@/TransitionRouter';
|
||||
import NotFound from '@/components/screens/NotFound';
|
||||
import AdminContainer from '@/components/admin/AdminContainer';
|
||||
|
||||
export default ({ location, match }: RouteComponentProps) => {
|
||||
return (
|
||||
<TransitionRouter>
|
||||
<Switch location={location}>
|
||||
<Route path={`${match.path}/`} component={AdminContainer} exact />
|
||||
<Route path={'*'} component={NotFound} />
|
||||
</Switch>
|
||||
</TransitionRouter>
|
||||
);
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue