From d8baddaa27ed340766e79ed65ec3966d5377793e Mon Sep 17 00:00:00 2001 From: anjaemin Date: Thu, 10 Nov 2022 14:18:15 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20url=20=EB=B3=80=EA=B2=BD(=EB=AF=B8?= =?UTF-8?q?=EC=99=84=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/download/index.tsx | 2 +- src/pages/main/index.tsx | 6 +++--- src/state/reducers/DeleteFileProps.ts | 5 ++++- src/state/reducers/DownloadFileProps.ts | 2 +- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/pages/download/index.tsx b/src/pages/download/index.tsx index f989046..96eaef1 100644 --- a/src/pages/download/index.tsx +++ b/src/pages/download/index.tsx @@ -31,7 +31,7 @@ export const DownloadPage: React.FC = () => { diff --git a/src/pages/main/index.tsx b/src/pages/main/index.tsx index 3c8813b..3e6274c 100644 --- a/src/pages/main/index.tsx +++ b/src/pages/main/index.tsx @@ -16,12 +16,11 @@ export const MainPage: React.FC = () => { const [typingCount, setTypingCount] = useState(0); const [uploading, setUploading] = useState(true); const [progressValue, serProgressValue] = useState(0); - // eslint-disable-next-line + const [retentionPeriod, setRetentionPeriod] = useState(false); - // eslint-disable-next-line const [downloadCount, setDownloadCount] = useState(false); - // eslint-disable-next-line const [passwordBoolean, setPasswordBoolean] = useState(false); + const [password, setPassword] = useState(''); const [fileProps, setFileProps] = useState({ filename: '', @@ -75,6 +74,7 @@ export const MainPage: React.FC = () => { size: getFileSize(res.data.size), lastModified: res.data.lastModified, token: res.data.token, + download_url: res.data.download_url, //추후에 기한,다운로드횟수 추가예정 }); } else { diff --git a/src/state/reducers/DeleteFileProps.ts b/src/state/reducers/DeleteFileProps.ts index 9409794..d1a5ed1 100644 --- a/src/state/reducers/DeleteFileProps.ts +++ b/src/state/reducers/DeleteFileProps.ts @@ -1,7 +1,10 @@ import { ActionType } from '../action-types'; import { Action } from '../actions'; -const reducer = (state: any = { filename: null, token: null }, action: Action): any => { +const reducer = ( + state: any = { filename: null, token: null, delete_url: null }, + action: Action, +): any => { switch (action.type) { case ActionType.DeleteFileProps: return action.props; diff --git a/src/state/reducers/DownloadFileProps.ts b/src/state/reducers/DownloadFileProps.ts index 829c1cb..4790f0f 100644 --- a/src/state/reducers/DownloadFileProps.ts +++ b/src/state/reducers/DownloadFileProps.ts @@ -2,7 +2,7 @@ import { ActionType } from '../action-types'; import { Action } from '../actions'; const reducer = ( - state: any = { filename: null, size: null, lastModified: null, token: null }, + state: any = { filename: null, size: null, lastModified: null, token: null, donwload_url: null }, action: Action, ): any => { switch (action.type) {