From c0bc606750f40df22b09676c64d6e0617f0eea4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A1=B0=EB=AF=BC=ED=98=B8?= <78631876+minh0518@users.noreply.github.com> Date: Thu, 29 Feb 2024 18:23:37 +0900 Subject: [PATCH] =?UTF-8?q?=EB=B0=9C=ED=91=9C=20=EC=83=9D=EC=84=B1=20?= =?UTF-8?q?=ED=8E=98=EC=9D=B4=EC=A7=80=20=EC=A4=91=EB=B3=B5=20post=20?= =?UTF-8?q?=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95,=20CDN=20baseUrl=20?= =?UTF-8?q?=ED=99=98=EA=B2=BD=EB=B3=80=EC=88=98=20=EC=A0=81=EC=9A=A9=20(#3?= =?UTF-8?q?6)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * refactor: JSDoc 일부 수정 * fix: 중복 post 버그 수정 * fix: 페이지 이동 조건 수정 * refactor: CDN baseUrl 환경변수 적용 --- .../[id]/_components/SelectSentenceSection.tsx | 2 +- .../setting/[id]/_components/SettingProcess.tsx | 3 +-- .../upload/[id]/_component/ControlButtons.tsx | 2 +- .../upload/[id]/_component/UploadPpt.tsx | 2 +- .../upload/[id]/_hooks/presentation.tsx | 5 ++++- src/types/service.ts | 13 ++++++++----- 6 files changed, 16 insertions(+), 11 deletions(-) diff --git a/src/app/(afterlogin)/setting/[id]/_components/SelectSentenceSection.tsx b/src/app/(afterlogin)/setting/[id]/_components/SelectSentenceSection.tsx index c7a4c04..c1c085a 100644 --- a/src/app/(afterlogin)/setting/[id]/_components/SelectSentenceSection.tsx +++ b/src/app/(afterlogin)/setting/[id]/_components/SelectSentenceSection.tsx @@ -55,7 +55,7 @@ const SelectSentenceSection = ({
{`${currentPage { } if (currentStep === 0 && settingInfo.practiceMode === 'SHOW') { setCurrentStep(2); - } - if (currentStep !== 2) setCurrentStep((prev) => (prev + 1) as ProcessStepType); + } else if (currentStep !== 2) setCurrentStep((prev) => (prev + 1) as ProcessStepType); }; return ( diff --git a/src/app/(afterlogin)/upload/[id]/_component/ControlButtons.tsx b/src/app/(afterlogin)/upload/[id]/_component/ControlButtons.tsx index ed8d15c..e47170e 100644 --- a/src/app/(afterlogin)/upload/[id]/_component/ControlButtons.tsx +++ b/src/app/(afterlogin)/upload/[id]/_component/ControlButtons.tsx @@ -156,7 +156,7 @@ const ControlButtons = ({ })} > ppt이미지
{`${currentPageIndex { onSuccess: async (response) => { const { presentationId } = await response.json(); if (submitAction === 'start') router.push(`/setting/${presentationId}`); - if (submitAction === 'save') openToastWithData(); + if (submitAction === 'save') { + router.push(`/upload/${presentationId}`); + openToastWithData(); + } }, onError: () => { alert('저장하는 도중 문제가 발생했습니다.'); diff --git a/src/types/service.ts b/src/types/service.ts index 939d9f8..9b06d7c 100644 --- a/src/types/service.ts +++ b/src/types/service.ts @@ -2,15 +2,14 @@ type ValuePiece = Date | null; export type Value = ValuePiece | [ValuePiece, ValuePiece]; -// mock +// # Mock + export interface ValidtaionType { title: string; script: string; memo: string; deadlineDate: Value; } - -// Mock export interface MockUploadDataType { id?: number; dday?: number; @@ -34,8 +33,12 @@ export interface MockUploadDataType { }[]; } -// service -/** 유저 정보를 나타내는 객체 */ +// # Service + +/** 발표 자료 업로드 객체 - 발표 상세 조회, 생성 및 수정 + * 기본타입 - 생성 및 수정에 사용되는 요소들 + * 옵셔널타입 - 발표 상세 조회시, 추가되는 요소들 + */ export interface UploadDataType { /** 발표 ID - URL에 라우팅 되는 값 */ id?: number;