diff --git a/.env.dev b/.env.dev new file mode 100755 index 0000000..59c3b29 --- /dev/null +++ b/.env.dev @@ -0,0 +1,2 @@ +VITE_APP_TITLE=UDNI tip2toe frontend +VITE_APIURL=https://phenopacket-stage.scilifelab.se \ No newline at end of file diff --git a/src/components/Index.tsx b/src/components/Index.tsx index fc13322..44b5875 100755 --- a/src/components/Index.tsx +++ b/src/components/Index.tsx @@ -53,14 +53,12 @@ export default function Home() {

-
-
- {' '} +
+
+
+ {' '}

Start new form

-

- For physicians, geneticists. Start questionnare. -

-
-
- -

Continue form

-
-

- Add images, documents to an existing form. -

- +
+
+
+ +

Continue form

+

+ Continue editing an existing form. +

+
- +
+ ); } diff --git a/src/components/questionnaire/EditIndividual.tsx b/src/components/questionnaire/EditIndividual.tsx index 75f958e..0e1462c 100644 --- a/src/components/questionnaire/EditIndividual.tsx +++ b/src/components/questionnaire/EditIndividual.tsx @@ -1,4 +1,4 @@ -import { useContext } from 'react'; +import { useContext, useEffect } from 'react'; import { useForm } from 'react-hook-form'; import { useNavigate } from 'react-router-dom'; import { AppContext } from '../../context/AppContext'; @@ -20,6 +20,12 @@ export interface IIndividualFormData { } export default function EditIndividual() { + useEffect(() => { + return () => { + handleSubmit(doSubmit)(); + }; + }, []); + const navigate = useNavigate(); const { nextUrl } = useNextUrl(); @@ -128,16 +134,16 @@ export default function EditIndividual() {
@@ -153,6 +159,7 @@ export default function EditIndividual() { 'Latino', 'Middle East', 'Oceanian', + 'Mixed' ].map((x) => ({ label: x, value: x }))} /> {errors?.customFormData?.ethnicity && (