From 13f4f871d9bb2b0ea726690bd669b526ab0c0a43 Mon Sep 17 00:00:00 2001 From: kimsuyeon_0916 Date: Tue, 5 Nov 2024 18:50:31 +0900 Subject: [PATCH 01/11] =?UTF-8?q?fix:=20#270=20=EB=8B=89=EB=84=A4=EC=9E=84?= =?UTF-8?q?=20=EC=A4=91=EB=B3=B5=20=EC=B2=B4=ED=81=AC=20=EC=8B=9C,=20?= =?UTF-8?q?=EB=B6=88=ED=95=84=EC=9A=94=ED=95=9C=20api=20=ED=98=B8=EC=B6=9C?= =?UTF-8?q?=20=EC=9D=B4=EC=8A=88=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/useAuth.ts | 1 - src/pages/account/nicknameSetting/NicknameSettingPage.tsx | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/hooks/useAuth.ts b/src/hooks/useAuth.ts index 256dc9ef..7499233e 100644 --- a/src/hooks/useAuth.ts +++ b/src/hooks/useAuth.ts @@ -99,7 +99,6 @@ export const useCheckDuplicateNickname = (authKeys: string[], isEnabled: boolean queryKey: authKeys, queryFn: isEnabled => isEnabled && checkDuplicateNickname(authKeys[1]), enabled: isEnabled, - staleTime: 1000, }); }; diff --git a/src/pages/account/nicknameSetting/NicknameSettingPage.tsx b/src/pages/account/nicknameSetting/NicknameSettingPage.tsx index c1d45a7f..fe0985dc 100644 --- a/src/pages/account/nicknameSetting/NicknameSettingPage.tsx +++ b/src/pages/account/nicknameSetting/NicknameSettingPage.tsx @@ -46,7 +46,7 @@ const NicknameSettingPage = () => { const nickname = useDebounce(watch('nickname')); const authKeys = ['checkDuplicateNickname', nickname]; - const { data } = useCheckDuplicateNickname(authKeys, isDirty && isValid); + const { data } = useCheckDuplicateNickname(authKeys, isDirty && isValid && !!nickname); const [duplicateNicknameValidation, setDuplicateNicknameValidation] = useState(''); const [duplicated, setDuplicated] = useState(false); From 40c78ae3740008db26677931a5e690e387d06b5a Mon Sep 17 00:00:00 2001 From: kimsuyeon_0916 Date: Tue, 5 Nov 2024 20:42:26 +0900 Subject: [PATCH 02/11] =?UTF-8?q?feat:=20#273=20checkEnterKeyDown=20?= =?UTF-8?q?=EC=BB=A4=EC=8A=A4=ED=85=80=20=EC=9C=A0=ED=8B=B8=20=ED=95=A8?= =?UTF-8?q?=EC=88=98=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/checkEnterKeyDown.ts | 5 +++++ src/utils/index.ts | 2 ++ 2 files changed, 7 insertions(+) create mode 100644 src/utils/checkEnterKeyDown.ts diff --git a/src/utils/checkEnterKeyDown.ts b/src/utils/checkEnterKeyDown.ts new file mode 100644 index 00000000..c279445b --- /dev/null +++ b/src/utils/checkEnterKeyDown.ts @@ -0,0 +1,5 @@ +const checkEnterKeyDown = (e: React.KeyboardEvent) => { + if (e.key === 'Enter' && e.target.tagName != 'TEXTAREA') e.preventDefault(); +}; + +export default checkEnterKeyDown; diff --git a/src/utils/index.ts b/src/utils/index.ts index bfe23fc3..9d714005 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -13,6 +13,7 @@ import isNotNumber from './isNotNumber'; import calculateDate from './calculateDate'; import throttle from './throttle'; import addClassToEmptyPTags from './addClassToEmptyPTags'; +import checkEnterKeyDown from './checkEnterKeyDown'; export { modules, @@ -31,4 +32,5 @@ export { calculateDate, throttle, addClassToEmptyPTags, + checkEnterKeyDown, }; From 2a4cdbfe5dce2706970a3cac73258ea5b4c7e441 Mon Sep 17 00:00:00 2001 From: kimsuyeon_0916 Date: Tue, 5 Nov 2024 20:43:15 +0900 Subject: [PATCH 03/11] =?UTF-8?q?feat:=20#273=20=ED=8F=AC=ED=8A=B8?= =?UTF-8?q?=ED=8F=B4=EB=A6=AC=EC=98=A4=20=ED=8E=B8=EC=A7=91=20=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=A7=80=20=EB=82=B4=20checkEnterKeyDown=20=EC=9C=A0?= =?UTF-8?q?=ED=8B=B8=20=ED=95=A8=EC=88=98=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/portfolio/edit/PortfolioEditPage.tsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/pages/portfolio/edit/PortfolioEditPage.tsx b/src/pages/portfolio/edit/PortfolioEditPage.tsx index 508b3426..031f5af7 100644 --- a/src/pages/portfolio/edit/PortfolioEditPage.tsx +++ b/src/pages/portfolio/edit/PortfolioEditPage.tsx @@ -30,7 +30,7 @@ import { useUploadImageFile, } from '../../../hooks'; import PORTFOLIO_EDIT_DATA from './portfolioEditData'; -import { modules, formats, fixModalBackground, zipFile } from '../../../utils'; +import { modules, formats, fixModalBackground, zipFile, checkEnterKeyDown } from '../../../utils'; import { Refresh } from '../../../assets'; import type ReactQuill from 'react-quill'; import { useRecoilValue } from 'recoil'; @@ -266,10 +266,6 @@ const PortfolioEditPage = () => { } }, [isSuccessReadPortfolio]); - const checkEnterKeyDown = (e: React.KeyboardEvent) => { - if (e.key === 'Enter') e.preventDefault(); - }; - const checkTabKeyDown = (event: React.KeyboardEvent) => { if (event.key === 'Tab') event.preventDefault(); }; From 4a185e5370785c41c6b294e0bcf3e4d65e108120 Mon Sep 17 00:00:00 2001 From: kimsuyeon_0916 Date: Tue, 5 Nov 2024 20:43:24 +0900 Subject: [PATCH 04/11] =?UTF-8?q?fix:=20#273=20=ED=94=84=EB=A1=9C=ED=95=84?= =?UTF-8?q?=20=ED=8E=B8=EC=A7=91=20=EC=8B=9C=EC=97=90=20=EC=97=94=ED=84=B0?= =?UTF-8?q?=20=ED=82=A4=20=EB=88=84=EB=A5=B4=EB=A9=B4=20=ED=8E=B8=EC=A7=91?= =?UTF-8?q?=20=ED=8F=BC=20=EC=A0=9C=EC=B6=9C=EB=90=98=EB=8A=94=20=EC=9D=B4?= =?UTF-8?q?=EC=8A=88=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/profile/edit/ProfileEditPage.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/profile/edit/ProfileEditPage.tsx b/src/pages/profile/edit/ProfileEditPage.tsx index 7eeac74b..85e6528c 100644 --- a/src/pages/profile/edit/ProfileEditPage.tsx +++ b/src/pages/profile/edit/ProfileEditPage.tsx @@ -36,7 +36,7 @@ import { } from '../../../hooks'; import { useNavigate } from 'react-router-dom'; import { useReadInfinitePortfolioList } from '../../../hooks/usePortfolio'; -import { fixModalBackground } from '../../../utils'; +import { fixModalBackground, checkEnterKeyDown } from '../../../utils'; interface FormValues { nickname?: string; @@ -389,7 +389,7 @@ const ProfileEditPage = () => { return ( <> - + checkEnterKeyDown(e)}> Date: Tue, 5 Nov 2024 18:30:22 +0900 Subject: [PATCH 05/11] =?UTF-8?q?fix:=20#269=20=EB=B0=8B=ED=8C=80=20?= =?UTF-8?q?=ED=8F=AC=ED=8A=B8=ED=8F=B4=EB=A6=AC=EC=98=A4=20=EB=8C=80?= =?UTF-8?q?=EC=9A=A9=EB=9F=89=EC=9D=B4=EB=AF=B8=EC=A7=80=20=EC=97=85?= =?UTF-8?q?=EB=A1=9C=EB=93=9C=20=EC=95=88=EB=90=98=EB=8A=94=20=EC=9D=B4?= =?UTF-8?q?=EC=8A=88=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 밋팀 포트폴리오 편집/생성 페이로드에 불필요한 프로퍼티 제거 --- src/pages/portfolio/edit/PortfolioEditPage.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pages/portfolio/edit/PortfolioEditPage.tsx b/src/pages/portfolio/edit/PortfolioEditPage.tsx index 508b3426..54f1068a 100644 --- a/src/pages/portfolio/edit/PortfolioEditPage.tsx +++ b/src/pages/portfolio/edit/PortfolioEditPage.tsx @@ -116,6 +116,8 @@ const PortfolioEditPage = () => { // 폼 제출 const formData = getValues(); + delete formData.mainImage; + const portfolioData = { ...formData, mainImageFileName: imageResponse?.[1].fileName, From 21fd953ad45a3e82a23374d27d7fef4f9c7d11ea Mon Sep 17 00:00:00 2001 From: kimsuyeon_0916 Date: Tue, 5 Nov 2024 18:30:53 +0900 Subject: [PATCH 06/11] =?UTF-8?q?fix:=20#269=20=EB=8F=99=EC=9D=BC=ED=95=9C?= =?UTF-8?q?=20=ED=8F=AC=ED=8A=B8=ED=8F=B4=EB=A6=AC=EC=98=A4=20=EC=9D=B4?= =?UTF-8?q?=EB=AF=B8=EC=A7=80=20=EC=97=85=EB=A1=9C=EB=93=9C=20=EC=8B=9C,?= =?UTF-8?q?=20onChange=20=EC=9D=B4=EB=B2=A4=ED=8A=B8=20=EB=B0=9C=EC=83=9D?= =?UTF-8?q?=20=EC=95=88=ED=95=98=EB=8A=94=20=EC=9D=B4=EC=8A=88=20=ED=95=B4?= =?UTF-8?q?=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 포트폴리오 이미지 업로드 시, 마지막에 input 값 초기화 --- src/components/portfolio/image/upload/PortfolioImageUpload.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/portfolio/image/upload/PortfolioImageUpload.tsx b/src/components/portfolio/image/upload/PortfolioImageUpload.tsx index efeab4ff..ff04c41b 100644 --- a/src/components/portfolio/image/upload/PortfolioImageUpload.tsx +++ b/src/components/portfolio/image/upload/PortfolioImageUpload.tsx @@ -128,6 +128,7 @@ const PortfolioImageUpload = ({ shouldDirty: true, shouldTouch: true, }); + event.target.value = ''; // 같은 이름 파일 있을 때만 input value 초기화 }; continue; } From 01c1d1e3e9eba03f218e0c71bc56e74807fd56ea Mon Sep 17 00:00:00 2001 From: kimsuyeon_0916 Date: Tue, 5 Nov 2024 18:31:37 +0900 Subject: [PATCH 07/11] =?UTF-8?q?feat:=20#269=20=ED=8F=AC=ED=8A=B8?= =?UTF-8?q?=ED=8F=B4=EB=A6=AC=EC=98=A4=20=EA=B4=80=EB=A6=AC=20=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=A7=80=20=ED=8C=8C=EC=9D=BC=EB=AA=85=20=EC=98=A4?= =?UTF-8?q?=ED=83=80=20=EC=A0=95=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{PortfolioManagmentPage.tsx => PortfolioManagementPage.tsx} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/pages/portfolio/management/{PortfolioManagmentPage.tsx => PortfolioManagementPage.tsx} (100%) diff --git a/src/pages/portfolio/management/PortfolioManagmentPage.tsx b/src/pages/portfolio/management/PortfolioManagementPage.tsx similarity index 100% rename from src/pages/portfolio/management/PortfolioManagmentPage.tsx rename to src/pages/portfolio/management/PortfolioManagementPage.tsx From ede2847b3be47a22a36809a78178bc570fc58678 Mon Sep 17 00:00:00 2001 From: kimsuyeon_0916 Date: Tue, 5 Nov 2024 18:32:00 +0900 Subject: [PATCH 08/11] =?UTF-8?q?fix:=20#269=20=EB=B0=8B=ED=8C=80=20?= =?UTF-8?q?=ED=8F=AC=ED=8A=B8=ED=8F=B4=EB=A6=AC=EC=98=A4=20=EC=83=9D?= =?UTF-8?q?=EC=84=B1=20=EC=8B=9C,=20=EB=B6=88=ED=95=84=EC=9A=94=ED=95=9C?= =?UTF-8?q?=20api=20=ED=98=B8=EC=B6=9C=20=EC=9D=B4=EC=8A=88=20=ED=95=B4?= =?UTF-8?q?=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/usePortfolio.ts | 1 + .../portfolio/edit/PortfolioEditPage.tsx | 396 +++++++++--------- 2 files changed, 197 insertions(+), 200 deletions(-) diff --git a/src/hooks/usePortfolio.ts b/src/hooks/usePortfolio.ts index 1a6b6a90..d3eb7cfa 100644 --- a/src/hooks/usePortfolio.ts +++ b/src/hooks/usePortfolio.ts @@ -27,6 +27,7 @@ export const useReadPortfolio = (portfolioId: string) => { return useQuery({ queryKey: portfolioKeys.readPortfolio(portfolioId), queryFn: () => readPortfolio(portfolioId), + enabled: !!portfolioId, }); }; diff --git a/src/pages/portfolio/edit/PortfolioEditPage.tsx b/src/pages/portfolio/edit/PortfolioEditPage.tsx index 54f1068a..86400474 100644 --- a/src/pages/portfolio/edit/PortfolioEditPage.tsx +++ b/src/pages/portfolio/edit/PortfolioEditPage.tsx @@ -261,6 +261,7 @@ const PortfolioEditPage = () => { }; useEffect(() => { + setValue('content', PORTFOLIO_EDITOR_TEMPLATE); if (isSuccessReadPortfolio) { setProceedType(portfolio?.proceedType); setSkillList(portfolio?.skills ? portfolio?.skills : []); @@ -306,227 +307,222 @@ const PortfolioEditPage = () => { return ( <> - {isSuccessReadPortfolio && ( - checkEnterKeyDown(e)} - > - - -

포트폴리오 작성

-

- 작성하신 포트폴리오는 프로필을 통해 보여집니다. 진행했던 내용을 자유롭게 - 작성해보세요! -

-
-
- - - - 슬라이드 이미지 - - - {LABEL.image} - setModalOpen(true)} - /> - {modalOpen && ( - - setModalOpen(false)} /> - - )} - - checkEnterKeyDown(e)} + > + + +

포트폴리오 작성

+

+ 작성하신 포트폴리오는 프로필을 통해 보여집니다. 진행했던 내용을 자유롭게 작성해보세요! +

+
+
+ + + + 슬라이드 이미지 + + + {LABEL.image} + setModalOpen(true)} /> - - -
-
- - - - 기본 정보 - - {/* 포트폴리오 제목 */} - + setModalOpen(false)} /> + + )} + + + + +
+
+ + + + 기본 정보 + + {/* 포트폴리오 제목 */} + + {/* 포트폴리오 한줄 소개 */} + + + {/* 분야 */} + - {/* 포트폴리오 한줄 소개 */} - + + {/* 진행기간 */} + + 진행기간 - {/* 분야 */} - { + return ( + differenceInDays( + new Date(watch('endDate') as string), + new Date(startDate) + ) >= 0 || '시작일을 종료일보다 빠르게 설정해주세요' + ); + }, + }} /> - {/* 역할 */} - - {/* 진행기간 */} - - 진행기간 - - { - return ( - differenceInDays( - new Date(watch('endDate') as string), - new Date(startDate) - ) >= 0 || '시작일을 종료일보다 빠르게 설정해주세요' - ); - }, - }} - /> - - - - {/* 진행방식 */} - - 진행방식 - - - {PROCEED_TYPE.map(type => ( - -
- {type} -
-
- ))} -
- - {formState?.errors['proceedType']?.message} - -
-
- {/* 스킬 */} - - - - {skillList?.map(({ ...props }, index) => ( - + + {/* 진행방식 */} + + 진행방식 + + + {PROCEED_TYPE.map(type => ( + +
+ {type} +
+
))}
-
+ + {formState?.errors['proceedType']?.message} + +
-
-
-
- - - - 상세 내용 - - {LABEL.content} - { - ref(e); - if (quillRef) quillRef.current = e; - }} - value={watch('content')} - defaultValue={portfolio?.content ?? PORTFOLIO_EDITOR_TEMPLATE} - onChange={handleChangeEditor} - modules={modules} - formats={formats} - onKeyDown={checkTabKeyDown} - {...PORTFOLIO_EDIT_DATA.content} + {/* 스킬 */} + + - - -
-
- - - - 링크 - - addLink()} /> - - {links?.map((link, index) => ( - + {skillList?.map(({ ...props }, index) => ( + ))} - + - -
-
- - - navigate(-1)} /> - - +
+
+
-
- )} + + + + 상세 내용 + + {LABEL.content} + { + ref(e); + if (quillRef) quillRef.current = e; + }} + value={watch('content')} + defaultValue={portfolio?.content ?? PORTFOLIO_EDITOR_TEMPLATE} + onChange={handleChangeEditor} + modules={modules} + formats={formats} + onKeyDown={checkTabKeyDown} + {...PORTFOLIO_EDIT_DATA.content} + /> + + +
+
+ + + + 링크 + + addLink()} /> + + {links?.map((link, index) => ( + + ))} + + + +
+
+ + + navigate(-1)} /> + + + + + ) {alertOpen && ( From 7b61269ab138230f53c27dd9702056f723cb5b58 Mon Sep 17 00:00:00 2001 From: kimsuyeon_0916 Date: Tue, 5 Nov 2024 22:03:11 +0900 Subject: [PATCH 09/11] =?UTF-8?q?feat:=20#269=20=EB=B0=B0=EB=9F=B4?= =?UTF-8?q?=ED=8C=8C=EC=9D=BC=20=EB=82=B4,=20=ED=8F=AC=ED=8A=B8=ED=8F=B4?= =?UTF-8?q?=EB=A6=AC=EC=98=A4=20=EA=B4=80=EB=A6=AC=20=ED=8E=98=EC=9D=B4?= =?UTF-8?q?=EC=A7=80=20=ED=8C=8C=EC=9D=BC=EB=AA=85=20=EC=98=A4=ED=83=80=20?= =?UTF-8?q?=EC=A0=95=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/index.ts b/src/pages/index.ts index 3df1dbeb..0d023a00 100644 --- a/src/pages/index.ts +++ b/src/pages/index.ts @@ -27,7 +27,7 @@ import RecruitPostingApply from './recruit/recruitManagePage/RecruitPostingApply import RecruitMyPostings from './recruit/recruitManagePage/RecruitMyPostings'; import CompleteSignUpPage from './account/complete/CompleteSignUpPage'; import PrivateRouter from './routes/PrivateRouter'; -import PortfolioManagementPage from './portfolio/management/PortfolioManagmentPage'; +import PortfolioManagementPage from './portfolio/management/PortfolioManagementPage'; import NotFound from './notFound/NotFound'; import AccountSetting from './account/accountSetting/AccountSetting'; From 61b552f5abc3bda5f3dc94ef09f61f852cda9862 Mon Sep 17 00:00:00 2001 From: kimsuyeon_0916 Date: Tue, 5 Nov 2024 22:06:15 +0900 Subject: [PATCH 10/11] =?UTF-8?q?fix:=20#269=20=ED=8F=AC=ED=8A=B8=ED=8F=B4?= =?UTF-8?q?=EB=A6=AC=EC=98=A4=20=EA=B8=B0=EA=B0=84=20=EC=9C=A0=ED=9A=A8?= =?UTF-8?q?=EC=84=B1=20=EA=B2=80=EC=82=AC=20=EC=A1=B0=EA=B1=B4=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 조건 충족 시, 유효성 에러 메세지 제거 - 시작일/종료일 존재 시, 유효성 에러 메세지 노출 설정 --- .../portfolio/edit/PortfolioEditPage.tsx | 46 +++++++++++++++---- 1 file changed, 38 insertions(+), 8 deletions(-) diff --git a/src/pages/portfolio/edit/PortfolioEditPage.tsx b/src/pages/portfolio/edit/PortfolioEditPage.tsx index 86400474..ece973d1 100644 --- a/src/pages/portfolio/edit/PortfolioEditPage.tsx +++ b/src/pages/portfolio/edit/PortfolioEditPage.tsx @@ -65,7 +65,7 @@ const PortfolioEditPage = () => { const { data: portfolio, isSuccess: isSuccessReadPortfolio } = useReadPortfolio(portfolioId); - const { register, formState, handleSubmit, control, watch, getValues, setValue } = + const { register, formState, handleSubmit, control, watch, getValues, setValue, clearErrors } = useForm({ mode: 'onChange', values: { @@ -183,6 +183,22 @@ const PortfolioEditPage = () => { const role = useDebounce(watch('role')) as string; const { data: roles } = useReadRoleList(role); + // 진행 기간 + useEffect(() => { + const subscription = watch(value => { + if ( + differenceInDays( + new Date(value['endDate'] as string), + new Date(value['startDate'] as string) + ) >= 0 + ) { + clearErrors(['startDate', 'endDate']); + } + }); + + return () => subscription.unsubscribe(); + }, [watch]); + // 진행 방식 const [proceedType, setProceedType] = useState(portfolio?.proceedType); const handleRadioClick = (id: string) => { @@ -400,12 +416,14 @@ const PortfolioEditPage = () => { rules={{ required: '시작일을 설정해주세요', validate: (startDate: string) => { - return ( - differenceInDays( - new Date(watch('endDate') as string), - new Date(startDate) - ) >= 0 || '시작일을 종료일보다 빠르게 설정해주세요' - ); + if (watch('endDate')) { + return ( + differenceInDays( + new Date(watch('endDate') as string), + new Date(startDate) + ) >= 0 || '시작일을 종료일 이전으로 설정해주세요' + ); + } }, }} /> @@ -413,7 +431,19 @@ const PortfolioEditPage = () => { name={`endDate`} control={control} formState={formState} - {...PORTFOLIO_EDIT_DATA.endDate} + rules={{ + required: '종료일을 설정해주세요', + validate: (endDate: string) => { + if (watch('startDate')) { + return ( + differenceInDays( + new Date(endDate), + new Date(watch('startDate') as string) + ) >= 0 || '종료일을 시작일 이후로 설정해주세요' + ); + } + }, + }} /> From 8b3fd421e0a2db8bbca96798bde9074ea4215d67 Mon Sep 17 00:00:00 2001 From: kimsuyeon_0916 Date: Wed, 6 Nov 2024 13:18:36 +0900 Subject: [PATCH 11/11] =?UTF-8?q?feat:=20#273=20checkEnterKeyDown=20?= =?UTF-8?q?=EC=BB=A4=EC=8A=A4=ED=85=80=20=EC=9C=A0=ED=8B=B8=20=ED=95=A8?= =?UTF-8?q?=EC=88=98=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - != -> !== 연산자 오타 수정 --- src/utils/checkEnterKeyDown.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/checkEnterKeyDown.ts b/src/utils/checkEnterKeyDown.ts index c279445b..b4aeb359 100644 --- a/src/utils/checkEnterKeyDown.ts +++ b/src/utils/checkEnterKeyDown.ts @@ -1,5 +1,5 @@ const checkEnterKeyDown = (e: React.KeyboardEvent) => { - if (e.key === 'Enter' && e.target.tagName != 'TEXTAREA') e.preventDefault(); + if (e.key === 'Enter' && e.target.tagName !== 'TEXTAREA') e.preventDefault(); }; export default checkEnterKeyDown;