Remove main routing page

This commit is contained in:
Hazem Krimi
2021-05-01 17:57:45 +01:00
parent 86d9a9d1e5
commit 74cb35f044
-27
View File
@@ -1,27 +0,0 @@
import { Switch, Route, useRouteMatch } from 'react-router-dom';
import { useReactiveVar } from '@apollo/client';
import { roleVar } from '../../graphql/state';
import { Navbar, Sidebar } from '../../components';
import { Project } from '..';
const Main = () => {
const match = useRouteMatch();
const role = useReactiveVar(roleVar);
return (
<>
<Navbar withSidebar={role !== 'admin'} />
{role !== 'admin' && <Sidebar />}
<Switch>
<Route path={`${match.path}/`} exact>
<Project />
</Route>
<Route path={`${match.path}/project`} exact>
<Project />
</Route>
</Switch>
</>
);
};
export default Main;