From a5198dec30e142fdae4de3bb2743719a13595860 Mon Sep 17 00:00:00 2001 From: omjinLTS Date: Sun, 24 Mar 2024 17:24:06 +0900 Subject: [PATCH] hotfix: removed admission number input field make admission year with studentId --- src/pages/auth/signUp/SignUpPage.tsx | 28 +++------------------------- 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/src/pages/auth/signUp/SignUpPage.tsx b/src/pages/auth/signUp/SignUpPage.tsx index 081b6eb0..12f8a714 100644 --- a/src/pages/auth/signUp/SignUpPage.tsx +++ b/src/pages/auth/signUp/SignUpPage.tsx @@ -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) { @@ -129,29 +130,6 @@ const SignUpPage: React.FC = observer(() => { /> {errors.name ? {errors.name?.message} : null} - - {errors.admissionYear ? ( - {errors.admissionYear?.message} - ) : null} - { required: '학번을 입력해주세요.', minLength: { value: 8, - message: '8자리 입학년도를 입력해주세요.', + message: '8자리 학번을 입력해주세요.', }, maxLength: { value: 8, - message: '8자리 입학년도를 입력해주세요.', + message: '8자리 학번을 입력해주세요.', }, }} />