Skip to content

Commit

Permalink
Merge pull request #114 from CAUCSE/hotfix/#113
Browse files Browse the repository at this point in the history
hotfix: removed admission number input field
  • Loading branch information
omjinLTS authored Mar 24, 2024
2 parents 67cd074 + a5198de commit 0f8f2fc
Showing 1 changed file with 3 additions and 25 deletions.
28 changes: 3 additions & 25 deletions src/pages/auth/signUp/SignUpPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ const SignUpPage: React.FC = observer(() => {
const password = watch('password');
const onSubmit = async (body: User.CreateDto) => {
body.profileImage = null;
body.admissionYear = +body.studentId.slice(0, 4);
const { success, message } = (await signUp(body)) as unknown as StoreAPI;

if (success) {
Expand Down Expand Up @@ -129,29 +130,6 @@ const SignUpPage: React.FC = observer(() => {
/>
{errors.name ? <ErrorMessage>{errors.name?.message}</ErrorMessage> : null}

<Input
name="admissionYear"
type="number"
label="입학년도"
placeholder="입학년도 4자리를 입력하세요. (ex.2020)"
required
control={control}
rules={{
required: '입학년도를 입력해주세요.',
minLength: {
value: 4,
message: '4자리 입학년도를 입력해주세요.',
},
maxLength: {
value: 4,
message: '4자리 입학년도를 입력해주세요.',
},
}}
/>
{errors.admissionYear ? (
<ErrorMessage>{errors.admissionYear?.message}</ErrorMessage>
) : null}

<Input
name="studentId"
type="number"
Expand All @@ -163,11 +141,11 @@ const SignUpPage: React.FC = observer(() => {
required: '학번을 입력해주세요.',
minLength: {
value: 8,
message: '8자리 입학년도를 입력해주세요.',
message: '8자리 학번을 입력해주세요.',
},
maxLength: {
value: 8,
message: '8자리 입학년도를 입력해주세요.',
message: '8자리 학번을 입력해주세요.',
},
}}
/>
Expand Down

0 comments on commit 0f8f2fc

Please sign in to comment.