From 97b8b662539d25a5edff42bbffb72cae188df52e Mon Sep 17 00:00:00 2001 From: Jiho Park <59248080+jihorobert@users.noreply.github.com> Date: Mon, 14 Oct 2024 01:12:41 +0900 Subject: [PATCH] fix(fe): fix save button bug (#2163) --- apps/frontend/app/(main)/settings/page.tsx | 32 ++++++++++------------ 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/apps/frontend/app/(main)/settings/page.tsx b/apps/frontend/app/(main)/settings/page.tsx index 2be3c790d2..fb0e351c13 100644 --- a/apps/frontend/app/(main)/settings/page.tsx +++ b/apps/frontend/app/(main)/settings/page.tsx @@ -198,23 +198,21 @@ export default function Page() { } const onSubmitClick = () => { - return () => { - // submit 되기위해, watch로 확인되는 값이 default값과 같으면 setValue를 통해서 defaultProfileValues로 변경 - if (realName === '') { - setValue('realName', defaultProfileValues.userProfile?.realName) - } - if (majorValue === defaultProfileValues.major) { - setMajorValue(defaultProfileValues.major) - } - if (currentPassword === '') { - setValue('currentPassword', 'tmppassword1') - } - if (newPassword === '') { - setValue('newPassword', 'tmppassword1') - } - if (confirmPassword === '') { - setValue('confirmPassword', 'tmppassword1') - } + // submit 되기위해, watch로 확인되는 값이 default값과 같으면 setValue를 통해서 defaultProfileValues로 변경 + if (realName === '') { + setValue('realName', defaultProfileValues.userProfile?.realName) + } + if (majorValue === defaultProfileValues.major) { + setMajorValue(defaultProfileValues.major) + } + if (currentPassword === '') { + setValue('currentPassword', 'tmppassword1') + } + if (newPassword === '') { + setValue('newPassword', 'tmppassword1') + } + if (confirmPassword === '') { + setValue('confirmPassword', 'tmppassword1') } }