Skip to content

Commit

Permalink
Fix boolean fields not showing
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasr8 committed Jul 18, 2024
1 parent d3d4e51 commit ee08d59
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/pages/participant/fields.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@ export function Field(field: FieldProps) {
case 'number':
case 'email':
case 'phone':
case 'bool':
return <TextField {...field} />;
case 'bool':
return <BooleanField {...field} />;
case 'textarea':
return <TextAreaField {...field} />;
case 'date':
Expand Down Expand Up @@ -92,6 +93,15 @@ function TextField({title, description, data}: FieldProps) {
);
}

function BooleanField({title, description, data}: FieldProps) {
return (
<div>
<FieldHeader title={title} description={description} />
<Typography variant="body1">{data ? 'yes' : 'no'}</Typography>
</div>
);
}

function TextAreaField({title, description, data}: FieldProps) {
return (
<div>
Expand Down

0 comments on commit ee08d59

Please sign in to comment.