|
1 | | -import React from 'react' |
| 1 | +import React, { useState } from 'react' |
2 | 2 | import MobileLayout from '../components/layout/MobileLayout' |
3 | 3 | import { useNavigate } from 'react-router-dom' |
4 | | -import { Header } from '../components/UI/Header' |
5 | 4 | import { Button } from '../components/UI/Recruit_Button' |
6 | 5 | import { RecruitHeader } from '../components/UI/RecruitUI' |
7 | 6 | import { InputField } from '../components/UI/Recruit_InputField' |
8 | 7 |
|
9 | 8 | export const RecruitResult: React.FC = () => { |
| 9 | + const navigate = useNavigate() |
| 10 | + const [checkInput, setCheckInput] = useState('') |
10 | 11 |
|
11 | | - const navigate = useNavigate() |
| 12 | + const handleInputChange = (e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement>) => { |
| 13 | + setCheckInput(e.target.value) |
| 14 | + } |
12 | 15 |
|
13 | 16 | const handleSubmit = (e: React.FormEvent) => { |
14 | | - e.preventDefault() |
15 | | - navigate('/recruit-check') |
| 17 | + e.preventDefault() |
| 18 | + navigate('/recruit-check') |
16 | 19 | } |
| 20 | + |
17 | 21 | return ( |
18 | 22 | <MobileLayout> |
19 | | - <Header /> |
20 | 23 | <RecruitHeader title="컴퓨터 소프트웨어 공학과 전공 동아리 다솜 34기 합격자 조회" /> |
21 | 24 | <form className="mt-4 bg-mainBlack w-full px-2" onSubmit={handleSubmit}> |
22 | 25 | <InputField |
23 | 26 | label="학번 마지막 4자리 + 전화번호 마지막 4자리를 입력해주세요." |
24 | | - subLabel='ex) 08470542' |
25 | | - type='test' |
26 | | - required |
| 27 | + subLabel="ex) 08470542" |
| 28 | + type="text" |
| 29 | + name="checkInput" |
| 30 | + value={checkInput} |
| 31 | + onChange={handleInputChange} |
27 | 32 | /> |
28 | | - <Button text="결과 확인하기"/> |
| 33 | + <Button text="결과 확인하기" /> |
29 | 34 | </form> |
30 | 35 | </MobileLayout> |
31 | 36 | ) |
32 | 37 | } |
33 | | - |
34 | | - |
|
0 commit comments