Skip to content

Commit

Permalink
Answers as a type
Browse files Browse the repository at this point in the history
  • Loading branch information
juni-haukur committed Sep 10, 2024
1 parent 5cdf8a8 commit e76ae0d
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ import {
} from '@island.is/application/core'
import { Application, Form, FormModes } from '@island.is/application/types'
import { m } from '../lib/messages'
import { infer as zinfer } from 'zod'
import { dataSchema } from '../lib/dataSchema'
type Answers = zinfer<typeof dataSchema>

export const Done: Form = buildForm({
id: 'done',
Expand Down Expand Up @@ -35,7 +38,7 @@ export const Done: Form = buildForm({
description: (application: Application) => ({
...m.listSignedDescription,
values: {
name: (application.answers.list as any).name,
name: (application.answers as Answers).list.name,
},
}),
children: [
Expand Down

0 comments on commit e76ae0d

Please sign in to comment.