From 39229d8a665db8ce7746408dd896b533792d02a5 Mon Sep 17 00:00:00 2001 From: rito528 <39003544+rito528@users.noreply.github.com> Date: Wed, 14 Feb 2024 01:08:59 +0900 Subject: [PATCH] fix: pretty --- src/features/form/api/form.ts | 2 +- src/features/form/components/CreateForm.tsx | 8 ++++---- src/features/form/components/DashboardFormList.tsx | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/features/form/api/form.ts b/src/features/form/api/form.ts index a2513cc9..257808c6 100644 --- a/src/features/form/api/form.ts +++ b/src/features/form/api/form.ts @@ -13,7 +13,7 @@ import type { FormQuestion, Visibility, } from '../types/formSchema'; -import type { Either} from 'fp-ts/lib/Either'; +import type { Either } from 'fp-ts/lib/Either'; const apiServerUrl = 'http://localhost:9000'; diff --git a/src/features/form/components/CreateForm.tsx b/src/features/form/components/CreateForm.tsx index c62756ed..c33d8b6b 100644 --- a/src/features/form/components/CreateForm.tsx +++ b/src/features/form/components/CreateForm.tsx @@ -158,7 +158,7 @@ export const CreateFormComponent = ({ token }: Token) => { interface FormProps { register: UseFormRegister; - control: Control; + control: Control; visibility: Visibility; } @@ -233,7 +233,7 @@ interface Question { } interface QuestionProps { - control: Control; + control: Control; register: UseFormRegister; questionIndex: number; removeQuestion: (index: number) => void; @@ -370,7 +370,7 @@ const CreateQuestionComponent = ({ register, control }: FormProps) => { control, name: `questions`, }); - const answerType = (questionIndex: number) => + const useAnswerType = (questionIndex: number) => useWatch({ control, name: `questions.${questionIndex}.answerType`, @@ -404,7 +404,7 @@ const CreateQuestionComponent = ({ register, control }: FormProps) => { register={register} questionIndex={index} removeQuestion={remove} - answerType={answerType} + answerType={useAnswerType} /> ))} diff --git a/src/features/form/components/DashboardFormList.tsx b/src/features/form/components/DashboardFormList.tsx index 7b571747..83ea1134 100644 --- a/src/features/form/components/DashboardFormList.tsx +++ b/src/features/form/components/DashboardFormList.tsx @@ -70,8 +70,8 @@ export const Forms = ({ forms }: Props) => { export const CreateFormButton = () => { return ( - - ) -} + ); +};