From c36b634ec269e34bc9f37c1252ac8b14c850afed Mon Sep 17 00:00:00 2001 From: Lukas Russell Date: Wed, 16 Apr 2025 23:10:05 +0100 Subject: [PATCH 1/2] fixed bugs --- .../PatientInfoForm/PatientInfoForm.tsx | 4 +--- src/views/home/Intro.tsx | 10 ++++++++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/components/Questionnaire-pages/PatientInfoForm/PatientInfoForm.tsx b/src/components/Questionnaire-pages/PatientInfoForm/PatientInfoForm.tsx index 187c760..5617549 100644 --- a/src/components/Questionnaire-pages/PatientInfoForm/PatientInfoForm.tsx +++ b/src/components/Questionnaire-pages/PatientInfoForm/PatientInfoForm.tsx @@ -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) => { @@ -250,7 +250,6 @@ const PatientInfoForm = ({ handleNext }: PatientInfoFormProps) => { console.log(formErrors) return ( - // Return the Information form @@ -338,7 +337,6 @@ const PatientInfoForm = ({ handleNext }: PatientInfoFormProps) => { > Yes No - Prefer not to say {formErrors.gender_same_as_sex && {formErrors.gender_same_as_sex}} diff --git a/src/views/home/Intro.tsx b/src/views/home/Intro.tsx index ab3ffac..112c259 100644 --- a/src/views/home/Intro.tsx +++ b/src/views/home/Intro.tsx @@ -1,10 +1,16 @@ +'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 = () => { - return ( + const { data: session } = useSession() + const role = session?.user.role + return ( // bg-backgroundPaper
{ may have. - From 87d9eadb316bc187da9eaa578ec71d5b150fb6e9 Mon Sep 17 00:00:00 2001 From: Lukas Russell Date: Wed, 16 Apr 2025 23:19:06 +0100 Subject: [PATCH 2/2] linted code --- .../Questionnaire-pages/PatientInfoForm/PatientInfoForm.tsx | 1 + src/views/home/Intro.tsx | 1 + 2 files changed, 2 insertions(+) diff --git a/src/components/Questionnaire-pages/PatientInfoForm/PatientInfoForm.tsx b/src/components/Questionnaire-pages/PatientInfoForm/PatientInfoForm.tsx index 5617549..c34f79b 100644 --- a/src/components/Questionnaire-pages/PatientInfoForm/PatientInfoForm.tsx +++ b/src/components/Questionnaire-pages/PatientInfoForm/PatientInfoForm.tsx @@ -250,6 +250,7 @@ const PatientInfoForm = ({ handleNext }: PatientInfoFormProps) => { console.log(formErrors) return ( + // Return the Information form diff --git a/src/views/home/Intro.tsx b/src/views/home/Intro.tsx index 112c259..6f8c838 100644 --- a/src/views/home/Intro.tsx +++ b/src/views/home/Intro.tsx @@ -11,6 +11,7 @@ const Intro = () => { const role = session?.user.role return ( + // bg-backgroundPaper