File tree Expand file tree Collapse file tree
apps/recruit/src/components/layout Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33import { Button } from '@repo/ui/components/buttons/Button' ;
44import { useState } from 'react' ;
55import { RecruitmentNotificationModal } from '@/components/modal/RecruitmentNotificationModal' ;
6+ import { useSubscribeRecruitmentNotify } from '@/hooks/mutations/useRecruitment.mutation' ;
67
78export const NotifyInput = ( ) => {
89 const [ email , setEmail ] = useState ( '' ) ;
910 const [ isModalOpen , setIsModalOpen ] = useState ( false ) ;
11+ const { mutate} = useSubscribeRecruitmentNotify ( ) ;
1012
1113 const isValidEmail =
1214 email . length > 0 && / ^ [ ^ \s @ ] + @ [ ^ \s @ ] + \. [ ^ \s @ ] + $ / . test ( email ) ;
1315
1416 const handleSubmit = ( e : React . FormEvent ) => {
1517 e . preventDefault ( ) ;
1618 if ( isValidEmail ) {
17- // TODO: API 호출
19+ mutate ( { email } ) ;
1820 setIsModalOpen ( true ) ;
1921 }
2022 } ;
You can’t perform that action at this time.
0 commit comments