File tree Expand file tree Collapse file tree 3 files changed +16
-4
lines changed
src/v1/bookGroup/create/steps Expand file tree Collapse file tree 3 files changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,10 @@ import BottomActionButton from '@/v1/base/BottomActionButton';
9
9
import { TitleField } from './fields' ;
10
10
11
11
const EnterTitleStep = ( { onNextStep } : MoveFunnelStepProps ) => {
12
- const { handleSubmit } = useFormContext < EnterTitleStepFormValues > ( ) ;
12
+ const {
13
+ handleSubmit,
14
+ formState : { isValid } ,
15
+ } = useFormContext < EnterTitleStepFormValues > ( ) ;
13
16
14
17
useRemoveVerticalScroll ( ) ;
15
18
@@ -24,6 +27,7 @@ const EnterTitleStep = ({ onNextStep }: MoveFunnelStepProps) => {
24
27
25
28
< BottomActionButton
26
29
type = "submit"
30
+ disabled = { ! isValid }
27
31
onClick = { handleSubmit ( ( ) => onNextStep ?.( ) ) }
28
32
>
29
33
다음
Original file line number Diff line number Diff line change @@ -10,7 +10,10 @@ export type JoinTypeStepFieldName = keyof SelectJoinTypeStepFormValues;
10
10
export type JoinTypeStepFieldProp = { name : JoinTypeStepFieldName } ;
11
11
12
12
const SelectJoinTypeStep = ( { onSubmit } : MoveFunnelStepProps ) => {
13
- const { handleSubmit } = useFormContext < SelectJoinTypeStepFormValues > ( ) ;
13
+ const {
14
+ handleSubmit,
15
+ formState : { isValid } ,
16
+ } = useFormContext < SelectJoinTypeStepFormValues > ( ) ;
14
17
15
18
return (
16
19
< article >
@@ -31,6 +34,7 @@ const SelectJoinTypeStep = ({ onSubmit }: MoveFunnelStepProps) => {
31
34
32
35
< BottomActionButton
33
36
type = "submit"
37
+ disabled = { ! isValid }
34
38
onClick = { onSubmit && handleSubmit ( onSubmit ) }
35
39
>
36
40
독서모임 만들기
Original file line number Diff line number Diff line change @@ -30,8 +30,11 @@ const SetUpDetailStep = ({
30
30
goToSelectBookStep,
31
31
onNextStep,
32
32
} : SetUpDetailStepProps ) => {
33
- const { handleSubmit, getValues } =
34
- useFormContext < SetUpDetailStepFormValues > ( ) ;
33
+ const {
34
+ handleSubmit,
35
+ getValues,
36
+ formState : { isValid } ,
37
+ } = useFormContext < SetUpDetailStepFormValues > ( ) ;
35
38
36
39
return (
37
40
< article className = "flex flex-col gap-[2.5rem] overflow-y-scroll pb-[7rem]" >
@@ -55,6 +58,7 @@ const SetUpDetailStep = ({
55
58
56
59
< BottomActionButton
57
60
type = "submit"
61
+ disabled = { ! isValid }
58
62
onClick = { handleSubmit ( ( ) => onNextStep ?.( ) ) }
59
63
>
60
64
다음
You can’t perform that action at this time.
0 commit comments