diff --git a/apps/cs/src/pages/bbs/ui/bbs-form.tsx b/apps/cs/src/pages/bbs/ui/bbs-form.tsx index 8f645da1e..b472073db 100644 --- a/apps/cs/src/pages/bbs/ui/bbs-form.tsx +++ b/apps/cs/src/pages/bbs/ui/bbs-form.tsx @@ -189,13 +189,9 @@ function BbsForm({ form, bbsId, ...props }: BbsFormProps) { type="number" min={0} value={boardTemplate?.atflMaxCnt ?? field.value ?? ""} - onChange={(e) => { - const value = e.target.value; - if (isNaN(parseInt(value))) return; - field.onChange( - value === "" ? null : parseInt(value), - ); - }} + onChange={(e) => + field.onChange(parseInt(e.target.value)) + } className="w-[12rem] !text-[1.3rem]" placeholder="최대 개수 입력" disabled={ @@ -224,13 +220,9 @@ function BbsForm({ form, bbsId, ...props }: BbsFormProps) { value={ boardTemplate?.atflMaxFileSz ?? field.value ?? "" } - onChange={(e) => { - const value = e.target.value; - if (isNaN(parseInt(value))) return; - field.onChange( - value === "" ? null : parseInt(value), - ); - }} + onChange={(e) => + field.onChange(parseInt(e.target.value)) + } className="w-[12rem] !text-[1.3rem]" placeholder="최대 크기 입력" disabled={ diff --git a/apps/cs/src/pages/image/ui/image-form.tsx b/apps/cs/src/pages/image/ui/image-form.tsx index af0e8f976..0368ace33 100644 --- a/apps/cs/src/pages/image/ui/image-form.tsx +++ b/apps/cs/src/pages/image/ui/image-form.tsx @@ -124,11 +124,9 @@ function ImageForm({ form, imgSn, ...props }: ImageFormProps) { type="number" min={0} value={field.value ?? ""} - onChange={(e) => { - const value = e.target.value; - if (isNaN(parseInt(value))) return; - field.onChange(parseInt(value)); - }} + onChange={(e) => + field.onChange(parseInt(e.target.value)) + } className="w-[12rem] !text-[1.3rem]" placeholder="정렬순서 입력" /> diff --git a/apps/cs/src/pages/module/ui/module-form.tsx b/apps/cs/src/pages/module/ui/module-form.tsx index 8ee685407..2615fe40b 100644 --- a/apps/cs/src/pages/module/ui/module-form.tsx +++ b/apps/cs/src/pages/module/ui/module-form.tsx @@ -113,11 +113,9 @@ function ModuleForm({ form, authorizationNo, ...props }: BannerFormProps) { type="number" min={0} value={field.value ?? ""} - onChange={(e) => { - const value = e.target.value; - if (isNaN(parseInt(value))) return; - field.onChange(parseInt(value)); - }} + onChange={(e) => + field.onChange(parseInt(e.target.value)) + } className="w-[12rem] !text-[1.3rem]" placeholder="정렬순서 입력" /> diff --git a/apps/cs/src/pages/popup/ui/popup-form.tsx b/apps/cs/src/pages/popup/ui/popup-form.tsx index 6ab790ac4..eea86c7b0 100644 --- a/apps/cs/src/pages/popup/ui/popup-form.tsx +++ b/apps/cs/src/pages/popup/ui/popup-form.tsx @@ -116,11 +116,9 @@ function PopupForm({ value={field.value ?? 0} className="w-[10rem] !text-[1.3rem]" placeholder="너비" - onChange={(e) => { - const value = e.target.value; - if (isNaN(parseInt(value))) return; - field.onChange(parseInt(value)); - }} + onChange={(e) => + field.onChange(parseInt(e.target.value)) + } /> @@ -139,11 +137,9 @@ function PopupForm({ value={field.value ?? 0} className="w-[10rem] !text-[1.3rem]" placeholder="높이" - onChange={(e) => { - const value = e.target.value; - if (isNaN(parseInt(value))) return; - field.onChange(parseInt(value)); - }} + onChange={(e) => + field.onChange(parseInt(e.target.value)) + } /> @@ -168,11 +164,9 @@ function PopupForm({ value={field.value ?? 0} className="w-[10rem] !text-[1.3rem]" placeholder="Left" - onChange={(e) => { - const value = e.target.value; - if (isNaN(parseInt(value))) return; - field.onChange(parseInt(value)); - }} + onChange={(e) => + field.onChange(parseInt(e.target.value)) + } /> @@ -191,11 +185,9 @@ function PopupForm({ value={field.value ?? 0} className="w-[10rem] !text-[1.3rem]" placeholder="Top" - onChange={(e) => { - const value = e.target.value; - if (isNaN(parseInt(value))) return; - field.onChange(parseInt(value)); - }} + onChange={(e) => + field.onChange(parseInt(e.target.value)) + } />