diff --git a/src/pages/customerPortal/components/EmptyBlock.tsx b/src/pages/customerPortal/components/EmptyBlock.tsx index cb8a08d..3630c02 100644 --- a/src/pages/customerPortal/components/EmptyBlock.tsx +++ b/src/pages/customerPortal/components/EmptyBlock.tsx @@ -21,17 +21,17 @@ const StyledCard = styled.div` ` const StyledImageWrapper = styled.div` > svg { - width: 108px; - height: 89px; + width: 108px; + height: 89px; } ${props => props.theme.breakpoints.down('s')} { - text-align: center; + text-align: center; - > svg { - width: 113px; - height: 145px; - } + > svg { + width: 113px; + height: 145px; + } } ` @@ -42,18 +42,18 @@ const StyledInfo = styled.div` justify-content: center; ${props => props.theme.breakpoints.down('s')} { - margin-top: -20px; + margin-top: -20px; } ${props => props.theme.breakpoints.up('s')} { - width: 56%; - max-width: 566px; - padding: 0 20px; + width: 56%; + max-width: 566px; + padding: 0 20px; } ` const StyledParagraph = styled(Paragraph)` ${props => props.theme.breakpoints.up('s')} { - margin-bottom: 10px !important; + margin-bottom: 10px !important; } ` const StyledButtonGroup = styled.div` @@ -63,19 +63,19 @@ const StyledButtonGroup = styled.div` gap: 15px; ${props => props.theme.breakpoints.down('s')} { - align-items: center; - margin-top: 20px; + align-items: center; + margin-top: 20px; } ` const StyledButton = styled(Button)` - width: 152px; + width: 152px; height: 28px; font-size: 12px; line-height: 28px; ` -export const EmptyBlock: FC = () => { +export const EmptyBlock: FC<{ className?: string; style?: React.CSSProperties }> = (props) => { return ( - + Take the next step on your health and wellness journey! diff --git a/src/pages/customerPortal/dashboard/Dashboard.tsx b/src/pages/customerPortal/dashboard/Dashboard.tsx index 923e77e..1448945 100644 --- a/src/pages/customerPortal/dashboard/Dashboard.tsx +++ b/src/pages/customerPortal/dashboard/Dashboard.tsx @@ -1,12 +1,82 @@ -import React from 'react' +import React, { useState } from 'react' import { EmptyBlock } from '../components/EmptyBlock' import { Container } from '../components/Container' import { InProgressItem } from '../components/InProgressItem' +import styled from 'styled-components' +import { Breakpoint } from '../../../components/Breakpoint' +import { Title } from '../../../components/Typography' +import { observer } from 'mobx-react-lite' +import { AuthStore } from '../../../stores/AuthStore' +import { ResultItem } from '../components/ResultItem' -export const Dashboard = () => { +const StyledMain = styled.div` + padding-top: 50px; + + ${props => props.theme.breakpoints.down('s')} { + padding-top: 32px; + } +` + +const StyledItemWrap = styled.div` + display: flex; + flex-direction: row; + + ${props => props.theme.breakpoints.down('s')} { + flex-direction: column; + } +` +const StyledProgress = styled.div` + ${props => props.theme.breakpoints.up('s')} { + width: 351px; + padding-right: 51px; + } +` +const StyledRecent = styled.div` + flex: auto; +` +const StyledSubTitle = styled(Title)` + margin-bottom: 14px; + + ${props => props.theme.breakpoints.down('s')} { + padding-left: 15px; + } +` +const StyledEmptyBlock = styled(EmptyBlock)` + margin-bottom: 32px` +export const Dashboard = observer(() => { + const [{ userInfo }] = useState(AuthStore.instance()) + const [inProgress, setInProgress] = useState([]) + const [history, setHistory] = useState(['1']) return ( - + + Hello, {userInfo?.firstName}! + + + Hello, {userInfo?.firstName}! + + + {!inProgress.length && } + + {!!inProgress.length && + ( + + Tests in Progress + + + + + )} + {!!history.length && ( + + Recent Test Results + + + + + )} + + ) -} +}) diff --git a/src/pages/customerPortal/history/History.tsx b/src/pages/customerPortal/history/History.tsx index 4e521a2..6fd9e3a 100644 --- a/src/pages/customerPortal/history/History.tsx +++ b/src/pages/customerPortal/history/History.tsx @@ -1,10 +1,10 @@ import React, { useState } from 'react' +import styled from 'styled-components' +import { Breakpoint } from 'components/Breakpoint' +import { Paragraph, Title } from 'components/Typography' import { EmptyBlock } from '../components/EmptyBlock' import { Container } from '../components/Container' -import { Paragraph, Title } from 'components/Typography' -import styled from 'styled-components' import { ResultItem } from '../components/ResultItem' -import { Breakpoint } from '../../../components/Breakpoint' const StyledMain = styled.div` padding-top: 43px;