mirror of
https://github.com/hazemKrimi/crimson-quirks-ui.git
synced 2026-05-01 18:20:28 +00:00
Update project page
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
import { useReactiveVar } from '@apollo/client';
|
import { useReactiveVar } from '@apollo/client';
|
||||||
|
import { Redirect } from 'react-router';
|
||||||
import { roleVar } from '../../graphql/state';
|
import { roleVar } from '../../graphql/state';
|
||||||
import { Empty } from '../../assets';
|
import { Empty } from '../../assets';
|
||||||
import { Box } from '../../components';
|
import { Box } from '../../components';
|
||||||
@@ -7,7 +8,7 @@ import { Wrapper } from './styles';
|
|||||||
const Project = () => {
|
const Project = () => {
|
||||||
const role = useReactiveVar(roleVar);
|
const role = useReactiveVar(roleVar);
|
||||||
|
|
||||||
return (
|
return role !== 'admin' ? (
|
||||||
<Wrapper color={role}>
|
<Wrapper color={role}>
|
||||||
<Box
|
<Box
|
||||||
width='100%'
|
width='100%'
|
||||||
@@ -21,6 +22,8 @@ const Project = () => {
|
|||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
</Wrapper>
|
</Wrapper>
|
||||||
|
) : (
|
||||||
|
<Redirect to='/clients' />
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user