Skip to content

Commit c51160b

Browse files
committed
chore(frontend): fix console errors
1 parent c04d3c7 commit c51160b

File tree

3 files changed

+14
-12
lines changed

3 files changed

+14
-12
lines changed

apps/frontend/src/components/questionnaire/PeriodForm.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export const messages = i18n("periodForm", {
2727
});
2828

2929
export function PeriodForm({ onSave, actionLabel }: PeriodFormProps) {
30-
const f = useForm<FormValues>({});
30+
const f = useForm<FormValues>({ mode: "uncontrolled" });
3131
const t = useStore(messages);
3232

3333
return (

apps/frontend/src/routes/_auth/questionnaire/_questionnaire/participant.tsx

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,18 @@ function QuestionnaireParticipant() {
3030
<h3>{t.title}</h3>
3131
<Stack>
3232
<Table>
33-
<Table.Tr>
34-
<Table.Th>{t.participantLabel}</Table.Th>
35-
<Table.Td>{questionnaire?.participant.id}</Table.Td>
36-
<Table.Td>{birthday ? time(new Date(birthday)) : <i>{t.birthdateMissing}</i>}</Table.Td>
37-
</Table.Tr>
38-
<Table.Tr>
39-
<Table.Th>{t.studyLabel}</Table.Th>
40-
<Table.Td>{questionnaire?.study.id}</Table.Td>
41-
<Table.Td>{questionnaire?.study.title}</Table.Td>
42-
</Table.Tr>
33+
<Table.Tbody>
34+
<Table.Tr>
35+
<Table.Th>{t.participantLabel}</Table.Th>
36+
<Table.Td>{questionnaire?.participant.id}</Table.Td>
37+
<Table.Td>{birthday ? time(new Date(birthday)) : <i>{t.birthdateMissing}</i>}</Table.Td>
38+
</Table.Tr>
39+
<Table.Tr>
40+
<Table.Th>{t.studyLabel}</Table.Th>
41+
<Table.Td>{questionnaire?.study.id}</Table.Td>
42+
<Table.Td>{questionnaire?.study.title}</Table.Td>
43+
</Table.Tr>
44+
</Table.Tbody>
4345
</Table>
4446
<form onSubmit={handleSubmit}>
4547
<Button type="submit">{t.formAction}</Button>

apps/frontend/src/routes/_auth/questionnaire/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function Questionnaire() {
2323

2424
const t = useStore(messages);
2525

26-
const f = useForm<FormValues>();
26+
const f = useForm<FormValues>({ mode: "uncontrolled" });
2727

2828
const validateParticipantMutation = $api.useMutation("get", "/participants/{id}", {
2929
onError(error) {

0 commit comments

Comments
 (0)