From 46130c0f883097aa95c7b3b3635ee94edee72e1d Mon Sep 17 00:00:00 2001 From: Hazem Krimi Date: Thu, 6 May 2021 01:44:14 +0100 Subject: [PATCH] Update project page --- src/pages/Project/index.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pages/Project/index.tsx b/src/pages/Project/index.tsx index 9c7698d..1de9f37 100644 --- a/src/pages/Project/index.tsx +++ b/src/pages/Project/index.tsx @@ -1,4 +1,5 @@ import { useReactiveVar } from '@apollo/client'; +import { Redirect } from 'react-router'; import { roleVar } from '../../graphql/state'; import { Empty } from '../../assets'; import { Box } from '../../components'; @@ -7,7 +8,7 @@ import { Wrapper } from './styles'; const Project = () => { const role = useReactiveVar(roleVar); - return ( + return role !== 'admin' ? ( { + ) : ( + ); };