From 822019d80185f6f2ecd74f2561ea82b8a55aa32a Mon Sep 17 00:00:00 2001 From: anjaemin Date: Thu, 17 Nov 2022 15:00:35 +0900 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20test=20code=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/main/index.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pages/main/index.tsx b/src/pages/main/index.tsx index 2a28c77..3041fa3 100644 --- a/src/pages/main/index.tsx +++ b/src/pages/main/index.tsx @@ -5,7 +5,6 @@ import { useNavigate } from 'react-router-dom'; import { toast } from 'react-toastify'; import { bindActionCreators } from 'redux'; -// eslint-disable-next-line import { CheckBox, PasswordInput, UpLoadButton, FileFind, Progress } from '../../components'; import { actionCreators } from '../../state'; import { getFileSize } from '../../utils'; From 90176db2781ee58e405f930621329a7e491950ca Mon Sep 17 00:00:00 2001 From: anjaemin Date: Thu, 17 Nov 2022 15:01:25 +0900 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20uploadDate=ED=91=9C=EA=B8=B0=20?= =?UTF-8?q?=EB=AC=B8=EC=A0=9C=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/getDate.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/getDate.ts b/src/utils/getDate.ts index 0f2091c..8bd3546 100644 --- a/src/utils/getDate.ts +++ b/src/utils/getDate.ts @@ -1,4 +1,4 @@ export const getDate = (date: string) => { - const NewDate = new Date(date); - return { year: NewDate.getFullYear(), month: NewDate.getMonth() + 1, day: NewDate.getDay() }; + const NewDate = date.split('T')[0].split('-'); + return { year: Number(NewDate[0]), month: Number(NewDate[1]), day: Number(NewDate[2]) }; };