File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
apps/frontend/src/routes/_auth/administration/questionnaires Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ type FormValues = components["schemas"]["QuestionnaireMutationDto"];
11
11
function AdministrationQuestionnairesEdit ( ) {
12
12
const p = Route . useParams ( ) ;
13
13
const q = useQueryClient ( ) ;
14
- const questionnaire = useSuspenseQuery (
14
+ const { data , isSuccess } = useSuspenseQuery (
15
15
$api . queryOptions ( "get" , "/questionnaires/{id}" , {
16
16
params : { path : { id : p . id } } ,
17
17
} )
@@ -36,14 +36,14 @@ function AdministrationQuestionnairesEdit() {
36
36
} ;
37
37
38
38
useEffect ( ( ) => {
39
- f . setValues ( questionnaire . data ?? { } ) ;
39
+ f . setValues ( { title : data . title } ) ;
40
40
f . resetDirty ( ) ;
41
- } , [ questionnaire . isSuccess , questionnaire . data ] ) ;
41
+ } , [ isSuccess , data ] ) ;
42
42
43
43
return (
44
44
< >
45
45
< form autoComplete = "off" onSubmit = { f . onSubmit ( handleSubmit ) } >
46
- < TextInput label = "Name" type = "name" { ...f . getInputProps ( "name " ) } />
46
+ < TextInput label = "Name" type = "name" { ...f . getInputProps ( "title " ) } />
47
47
48
48
< Button type = "submit" fullWidth mt = "xl" loading = { editQuestionnaireMutation . isPending } >
49
49
Change
You can’t perform that action at this time.
0 commit comments