From 0d4fc311275ded4ab57ac33612a6c7c11ccd32a5 Mon Sep 17 00:00:00 2001 From: Hazem Krimi Date: Wed, 12 May 2021 01:40:11 +0100 Subject: [PATCH] Add prototype page --- src/pages/Prototype/index.tsx | 30 ++++++++++++++++++++++++++++++ src/pages/Prototype/styles.ts | 12 ++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 src/pages/Prototype/index.tsx create mode 100644 src/pages/Prototype/styles.ts diff --git a/src/pages/Prototype/index.tsx b/src/pages/Prototype/index.tsx new file mode 100644 index 0000000..5864e21 --- /dev/null +++ b/src/pages/Prototype/index.tsx @@ -0,0 +1,30 @@ +import { useReactiveVar } from '@apollo/client'; +import { Redirect } from 'react-router'; +import { roleVar } from '../../graphql/state'; +import { Empty } from '../../assets'; +import { Box } from '../../components'; +import { Wrapper } from './styles'; + +const Prototype = () => { + const role = useReactiveVar(roleVar); + + return role !== 'admin' ? ( + + + + + + + + ) : ( + + ); +}; + +export default Prototype; diff --git a/src/pages/Prototype/styles.ts b/src/pages/Prototype/styles.ts new file mode 100644 index 0000000..bf7ee3d --- /dev/null +++ b/src/pages/Prototype/styles.ts @@ -0,0 +1,12 @@ +import styled from 'styled-components'; + +type WrapperProps = { + color?: 'client' | 'productOwner' | 'developer' | 'admin'; +}; + +export const Wrapper = styled.div` + .empty { + fill: ${({ theme, color }) => + color ? theme.colors[color].main : theme.colors.client.main}; + } +`;