Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ interface PatientInfoFormProps {
handleNext: () => void
}

const COUNTRIES = country.names()
const COUNTRIES = country.names().sort()

// Give the Info form the handleNext prop defined in the stepper
const PatientInfoForm = ({ handleNext }: PatientInfoFormProps) => {
Expand Down Expand Up @@ -338,7 +338,6 @@ const PatientInfoForm = ({ handleNext }: PatientInfoFormProps) => {
>
<MenuItem value='true'>Yes</MenuItem>
<MenuItem value='false'>No</MenuItem>
<MenuItem value='null'>Prefer not to say</MenuItem>
</Select>
{formErrors.gender_same_as_sex && <FormHelperText>{formErrors.gender_same_as_sex}</FormHelperText>}
</FormControl>
Expand Down
9 changes: 8 additions & 1 deletion src/views/home/Intro.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
'use client'

import { Typography, Grid2, Box, Button } from '@mui/material'

import { useSession } from 'next-auth/react'

import RechartsRadarChart from '@/components/charts/recharts/RechartsRadarChart'

const Intro = () => {
const { data: session } = useSession()
const role = session?.user.role

return (

// bg-backgroundPaper
Expand Down Expand Up @@ -93,7 +100,7 @@ const Intro = () => {
may have.
</Typography>
<Box sx={{ display: 'flex', justifyContent: 'center', p: 10 }}>
<Button variant='contained' color='primary' href='/questionnaire'>
<Button variant='contained' color='primary' href={role === 'PATIENT' ? '/my-questionnaire' : '/questionnaire'}>
Take The Test
</Button>
</Box>
Expand Down
Loading