From f4710873757513e7f4450be56750b464426c3209 Mon Sep 17 00:00:00 2001 From: Hazem Krimi Date: Wed, 28 Apr 2021 21:27:22 +0100 Subject: [PATCH] Add main user routing --- src/pages/Main/index.tsx | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/pages/Main/index.tsx diff --git a/src/pages/Main/index.tsx b/src/pages/Main/index.tsx new file mode 100644 index 0000000..1d18cd3 --- /dev/null +++ b/src/pages/Main/index.tsx @@ -0,0 +1,27 @@ +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 ( + <> + + {role !== 'admin' && } + + + + + + + + + + ); +}; + +export default Main;