Skip to content

Commit

Permalink
fix: KR모달 switch case 기준 구조분해할당 활용
Browse files Browse the repository at this point in the history
  • Loading branch information
Yeonseo-Jo committed Mar 27, 2024
1 parent e672768 commit 25a68db
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/MainDashBoard/components/editModeModal/AddKrModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const AddKrModal = ({ modalRef, objInfo, krIdx, mutateFcn }: IAddKrModalProps) =
let newValue;

switch (targetInputName) {
case KR_INPUT_DATA.INPUT_NAME.INPUT_TARGET:
case INPUT_TARGET:
if (parsedValue.length === maxLength + 1) {
setIsValidMax({ ...isValidMax, [targetInputName]: true });
}
Expand All @@ -67,9 +67,6 @@ const AddKrModal = ({ modalRef, objInfo, krIdx, mutateFcn }: IAddKrModalProps) =
newValue = parsedValue.replace(/\B(?=(\d{3})+(?!\d))/g, ',');
break;

newValue = parsedValue.replace(/\B(?=(\d{3})+(?!\d))/g, ',');
break;

default:
if (e.target.value.length > maxLength) {
setIsValidMax({ ...isValidMax, [targetInputName]: true });
Expand Down

0 comments on commit 25a68db

Please sign in to comment.