From b562c680960f25cf9fed0c990ee337c19a0c17f1 Mon Sep 17 00:00:00 2001 From: KANGYONGSU23 Date: Tue, 9 Apr 2024 08:54:25 +0900 Subject: [PATCH 1/6] =?UTF-8?q?fix=20::=20UI=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/mypage/AppliedICompanyItem.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/mypage/AppliedICompanyItem.tsx b/src/components/mypage/AppliedICompanyItem.tsx index f102523..3ae5c8b 100644 --- a/src/components/mypage/AppliedICompanyItem.tsx +++ b/src/components/mypage/AppliedICompanyItem.tsx @@ -57,7 +57,7 @@ export default function APpliedCompanyItem({ 2023.11.25

*/} -
+
Date: Tue, 9 Apr 2024 08:59:01 +0900 Subject: [PATCH 2/6] =?UTF-8?q?fix=20::=20=EB=AC=B8=EA=B5=AC=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 --- src/app/recruitments/apply/page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/recruitments/apply/page.tsx b/src/app/recruitments/apply/page.tsx index 5bd0b64..e7fbd8b 100644 --- a/src/app/recruitments/apply/page.tsx +++ b/src/app/recruitments/apply/page.tsx @@ -175,7 +175,7 @@ export default function Apply() { ※ 파일 첨부 시 파일 확장자를 확인해 주시기 바랍니다.

- pdf, ppt, pptx, hwp, jpg, png, zip, txt, mp4, png, jpg, svg + pdf, ppt, pptx, hwp, zip, txt, mp4, png, jpg, svg

Date: Tue, 9 Apr 2024 09:05:11 +0900 Subject: [PATCH 3/6] =?UTF-8?q?fix=20::=20=ED=8C=8C=EC=9D=BC=20=EC=97=85?= =?UTF-8?q?=EB=A1=9C=EB=93=9C=20=EB=B2=84=EA=B7=B8=20=ED=94=BD=EC=8A=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../recruitments/apply/FileUploader.tsx | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/src/components/recruitments/apply/FileUploader.tsx b/src/components/recruitments/apply/FileUploader.tsx index f233c8e..c61da13 100644 --- a/src/components/recruitments/apply/FileUploader.tsx +++ b/src/components/recruitments/apply/FileUploader.tsx @@ -21,11 +21,24 @@ export default function FileUploader({ const addFileList = () => { if (fileRef.current?.files?.length) { - const files = Array.from(fileRef.current?.files); - setFileList(prev => [...prev, ...files]); + const files = removeOverlap([...fileList, ...(Array.from(fileRef.current?.files))]); + setFileList(files); } }; + const removeOverlap = (array: any[]) => { + let uniqueObjects:{[key:string]:File} = {} + array.forEach(obj => { + const { name, lastModified,} = obj + const key = JSON.stringify({...name, ...lastModified}); + console.log(key) + uniqueObjects[key] = obj; + }); + console.log(array); + console.log(uniqueObjects); + return Object.values(uniqueObjects); + } + const prependFileItem = (fileName: string) => { setFileList(prev => prev.filter(file => file.name !== fileName)); }; @@ -42,7 +55,10 @@ export default function FileUploader({ ref={fileRef} type="file" multiple={multiple} - onChange={addFileList} + onChange={(e)=>{ + addFileList(); + e.target.value = ""; + }} />
{ From e3d1e6a9f654a7d637e639d85f2dd5b9124c1fff Mon Sep 17 00:00:00 2001 From: KANGYONGSU23 Date: Tue, 9 Apr 2024 09:11:54 +0900 Subject: [PATCH 4/6] =?UTF-8?q?style=20::=20console=20=EC=A0=95=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/recruitments/apply/FileUploader.tsx | 3 --- src/util/object/kebabMenuItems.ts | 1 - 2 files changed, 4 deletions(-) diff --git a/src/components/recruitments/apply/FileUploader.tsx b/src/components/recruitments/apply/FileUploader.tsx index c61da13..6edf34b 100644 --- a/src/components/recruitments/apply/FileUploader.tsx +++ b/src/components/recruitments/apply/FileUploader.tsx @@ -31,11 +31,8 @@ export default function FileUploader({ array.forEach(obj => { const { name, lastModified,} = obj const key = JSON.stringify({...name, ...lastModified}); - console.log(key) uniqueObjects[key] = obj; }); - console.log(array); - console.log(uniqueObjects); return Object.values(uniqueObjects); } diff --git a/src/util/object/kebabMenuItems.ts b/src/util/object/kebabMenuItems.ts index 85f755b..f9dedf2 100644 --- a/src/util/object/kebabMenuItems.ts +++ b/src/util/object/kebabMenuItems.ts @@ -41,7 +41,6 @@ export const getMypageKebabItems = (): KebabItemType[] => { { label: "로그아웃", onClick: () => { - console.log("로그아웃"); cookies.remove("access_token", { path: "/" }); cookies.remove("refresh_token", { path: "/" }); navigator.push("/account/login"); From 4140d4a5c1d50d88249a7998332cfab43b0571eb Mon Sep 17 00:00:00 2001 From: KANGYONGSU23 Date: Tue, 9 Apr 2024 09:16:30 +0900 Subject: [PATCH 5/6] =?UTF-8?q?fix=20::=20type=20=EC=A0=95=EC=9D=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/recruitments/apply/FileUploader.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/recruitments/apply/FileUploader.tsx b/src/components/recruitments/apply/FileUploader.tsx index 6edf34b..d122761 100644 --- a/src/components/recruitments/apply/FileUploader.tsx +++ b/src/components/recruitments/apply/FileUploader.tsx @@ -26,11 +26,11 @@ export default function FileUploader({ } }; - const removeOverlap = (array: any[]) => { + const removeOverlap = (array: File[]) => { let uniqueObjects:{[key:string]:File} = {} array.forEach(obj => { const { name, lastModified,} = obj - const key = JSON.stringify({...name, ...lastModified}); + const key = JSON.stringify({name, lastModified}); uniqueObjects[key] = obj; }); return Object.values(uniqueObjects); From 10055d44a0d00c1be974c1c174889c27c13422fa Mon Sep 17 00:00:00 2001 From: KANGYONGSU23 Date: Tue, 9 Apr 2024 10:04:21 +0900 Subject: [PATCH 6/6] =?UTF-8?q?style=20::=20=EC=BD=94=EB=93=9C=20=EC=A0=95?= =?UTF-8?q?=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/recruitments/apply/FileUploader.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/recruitments/apply/FileUploader.tsx b/src/components/recruitments/apply/FileUploader.tsx index d122761..f632726 100644 --- a/src/components/recruitments/apply/FileUploader.tsx +++ b/src/components/recruitments/apply/FileUploader.tsx @@ -29,7 +29,7 @@ export default function FileUploader({ const removeOverlap = (array: File[]) => { let uniqueObjects:{[key:string]:File} = {} array.forEach(obj => { - const { name, lastModified,} = obj + const { name, lastModified } = obj const key = JSON.stringify({name, lastModified}); uniqueObjects[key] = obj; });