From f5964649ed82c94255428b1b3d16a7b47654596b Mon Sep 17 00:00:00 2001 From: jungwoo3490 Date: Sat, 20 Jan 2024 00:31:50 +0900 Subject: [PATCH 1/8] =?UTF-8?q?fix:=20=EC=A7=A7=EC=9D=80=20=EA=B8=80?= =?UTF-8?q?=EC=9D=80=20=EC=99=B8=EB=B6=80=EC=97=90=EC=84=9C=20=EC=A4=91?= =?UTF-8?q?=EC=95=99=EC=A0=95=EB=A0=AC=EB=A1=9C=20=EB=B3=B4=EC=9D=B4?= =?UTF-8?q?=EB=8A=94=20=EC=9D=B4=EC=8A=88=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Detail/components/SmallLecueNote/SmallLecueNote.style.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Detail/components/SmallLecueNote/SmallLecueNote.style.ts b/src/Detail/components/SmallLecueNote/SmallLecueNote.style.ts index 058a8c51..770c5112 100644 --- a/src/Detail/components/SmallLecueNote/SmallLecueNote.style.ts +++ b/src/Detail/components/SmallLecueNote/SmallLecueNote.style.ts @@ -62,7 +62,6 @@ export const SmallLecueNoteNickName = styled.p` export const SmallLecueNoteContentWrapper = styled.div` display: flex; - justify-content: center; align-items: center; height: 10rem; From 4e0d632881089ad8d192db0e16716348feed29ec Mon Sep 17 00:00:00 2001 From: seoAreum <1971236@hansung.ac.kr> Date: Sat, 20 Jan 2024 02:43:44 +0900 Subject: [PATCH 2/8] =?UTF-8?q?style:=20UX=20=EB=9D=BC=EC=9D=B4=ED=8C=85?= =?UTF-8?q?=20=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Target/components/CompleteButton/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Target/components/CompleteButton/index.tsx b/src/Target/components/CompleteButton/index.tsx index d5dc9204..b6630ade 100644 --- a/src/Target/components/CompleteButton/index.tsx +++ b/src/Target/components/CompleteButton/index.tsx @@ -10,7 +10,7 @@ function CompleteButton({ isActive, onClick }: CompleteButtonProps) { return ( ); From c46cf99b66cbfffd44fe3782b39c91033c505fef Mon Sep 17 00:00:00 2001 From: seoAreum <1971236@hansung.ac.kr> Date: Sat, 20 Jan 2024 03:00:20 +0900 Subject: [PATCH 3/8] =?UTF-8?q?fix:=20=EA=B0=9C=ED=96=89=EB=AC=B8=EC=9E=90?= =?UTF-8?q?=20=EC=95=88=20=EB=A8=B9=ED=9E=88=EB=8A=94=20=EC=9D=B4=EC=8A=88?= =?UTF-8?q?=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Detail/components/SmallLecueNote/SmallLecueNote.style.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Detail/components/SmallLecueNote/SmallLecueNote.style.ts b/src/Detail/components/SmallLecueNote/SmallLecueNote.style.ts index e49c8685..0f29bb0d 100644 --- a/src/Detail/components/SmallLecueNote/SmallLecueNote.style.ts +++ b/src/Detail/components/SmallLecueNote/SmallLecueNote.style.ts @@ -81,6 +81,8 @@ export const SmallLecueNoteContent = styled.p` max-height: 100%; + white-space: pre-wrap; + ${({ theme }) => theme.fonts.Body2_M_14}; `; From 216a02dab5abe33d043c7c94fab032b75dccc383 Mon Sep 17 00:00:00 2001 From: eunbenn Date: Sat, 20 Jan 2024 03:37:20 +0900 Subject: [PATCH 4/8] =?UTF-8?q?fix:=20bookId=20null=EC=9D=B4=EB=A9=B4=20?= =?UTF-8?q?=EB=B9=88=EB=B0=B0=EC=97=B4=20=EB=B3=B4=EB=82=B4=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/LecueNote/page/LeceuNotePage/index.tsx | 2 +- src/StickerPack/page/StickerPack/index.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/LecueNote/page/LeceuNotePage/index.tsx b/src/LecueNote/page/LeceuNotePage/index.tsx index c8ad7184..2d01a324 100644 --- a/src/LecueNote/page/LeceuNotePage/index.tsx +++ b/src/LecueNote/page/LeceuNotePage/index.tsx @@ -36,7 +36,7 @@ function LecueNotePage() { const postMutation = usePostLecueNote(); const location = useLocation(); - const { bookId } = location.state; + const { bookId } = location.state || {}; const handleClickCategory = ( e: React.MouseEvent, diff --git a/src/StickerPack/page/StickerPack/index.tsx b/src/StickerPack/page/StickerPack/index.tsx index a0b4c859..59d0059a 100644 --- a/src/StickerPack/page/StickerPack/index.tsx +++ b/src/StickerPack/page/StickerPack/index.tsx @@ -17,7 +17,7 @@ function StickerPack() { const navigate = useNavigate(); const location = useLocation(); - const { bookId } = location.state; + const { bookId } = location.state || {}; const [selectedStickerData, setSelectedStickerData] = useState({ stickerId: 0, From 40297d2d2e3220bee68fbb259840e4d3c40f7351 Mon Sep 17 00:00:00 2001 From: eunbenn Date: Sat, 20 Jan 2024 03:39:59 +0900 Subject: [PATCH 5/8] =?UTF-8?q?fix:=20=EB=9D=BC=EC=9A=B0=ED=84=B0=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Router.tsx | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/src/Router.tsx b/src/Router.tsx index 84241d83..eb73787c 100644 --- a/src/Router.tsx +++ b/src/Router.tsx @@ -1,6 +1,7 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ import { Suspense } from 'react'; -import { ErrorBoundary } from 'react-error-boundary'; +import { ErrorBoundary, FallbackProps } from 'react-error-boundary'; +import { useQueryErrorResetBoundary } from 'react-query'; import { BrowserRouter, Route, Routes } from 'react-router-dom'; import ErrorPage from './components/common/ErrorPage'; @@ -20,9 +21,10 @@ import StickerPack from './StickerPack/page/StickerPack'; import TargetPage from './Target/page/TargetPage'; function Router() { + const { reset } = useQueryErrorResetBoundary(); return ( - + }> } /> @@ -54,23 +56,9 @@ function Router() { export default Router; -function fallbackRender({ error, resetErrorBoundary }: any) { - if (error.response.status === 404 || error.error.response.status === 404) { - resetErrorBoundary(); +function fallbackRender({ error }: FallbackProps) { + if (error.response?.status === 401 || error.response?.status === 403) { return ; - } else if ( - error.response.status === 401 || - error.error.response.status === 401 - ) { - resetErrorBoundary(); - localStorage.removeItem('token'); - localStorage.removeItem('nickname'); - return ; - } else { - alert( - ` ${error.response.status}, - ${error.error.response.status}, - 에러 발생 : 콘솔창 캡쳐해서 개발자 보내주삼`, - ); } + return ; } From c7fa4315a26acf0ff6ed76f8098fe8a3455a8fbc Mon Sep 17 00:00:00 2001 From: eunbenn Date: Sat, 20 Jan 2024 04:13:11 +0900 Subject: [PATCH 6/8] =?UTF-8?q?style:=20=EB=93=9C=EB=9E=98=EA=B7=B8=20?= =?UTF-8?q?=EA=B2=B9=EC=B9=A0=20=EB=95=8C=20=EC=95=88=EC=9B=80=EC=A7=81?= =?UTF-8?q?=EC=9D=B4=EB=8A=94=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/Detail/components/ZigZagView/index.tsx | 36 +++++++++++----------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/Detail/components/ZigZagView/index.tsx b/src/Detail/components/ZigZagView/index.tsx index c49aa3f9..4e9f9439 100644 --- a/src/Detail/components/ZigZagView/index.tsx +++ b/src/Detail/components/ZigZagView/index.tsx @@ -40,24 +40,6 @@ const ZigZagView = forwardRef(function ZigZagView( ))} )} - - {isEditable && ( - - - - )} {postedStickerList.length > 0 && ( {postedStickerList.map( @@ -78,6 +60,24 @@ const ZigZagView = forwardRef(function ZigZagView( )} )} + + {isEditable && ( + + + + )} ); }); From a7175d82783c51d31391cfe921072897fd42335f Mon Sep 17 00:00:00 2001 From: eunbenn Date: Sat, 20 Jan 2024 04:19:15 +0900 Subject: [PATCH 7/8] =?UTF-8?q?fix:=20lecue-book=20=EC=A0=84=EB=B6=80=20?= =?UTF-8?q?=EB=A7=89=EC=95=84=EB=91=90=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Detail/components/LecueNoteListContainer/index.tsx | 2 +- src/StickerAttach/hooks/usePostStickerState.ts | 2 +- src/StickerPack/page/StickerPack/index.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Detail/components/LecueNoteListContainer/index.tsx b/src/Detail/components/LecueNoteListContainer/index.tsx index bda5481c..7593a91a 100644 --- a/src/Detail/components/LecueNoteListContainer/index.tsx +++ b/src/Detail/components/LecueNoteListContainer/index.tsx @@ -80,7 +80,7 @@ function LecueNoteListContainer(props: LecueNoteListContainerProps) { ) { sessionStorage.setItem('scrollPosition', window.scrollY.toString()); - navigate('/sticker-pack', { state: { bookId: bookId } }); + navigate('/sticker-pack', { state: { bookId: bookId }, replace: true }); } else { setModalOn(true); } diff --git a/src/StickerAttach/hooks/usePostStickerState.ts b/src/StickerAttach/hooks/usePostStickerState.ts index 60f0bf86..c8dcf91f 100644 --- a/src/StickerAttach/hooks/usePostStickerState.ts +++ b/src/StickerAttach/hooks/usePostStickerState.ts @@ -21,7 +21,7 @@ const usePostStickerState = (bookUuId: string) => { }); }, onSuccess: () => { - navigate(`/lecue-book/${bookUuId}`); + navigate(`/lecue-book/${bookUuId}`, { replace: true }); }, onError: () => navigate('/error'), diff --git a/src/StickerPack/page/StickerPack/index.tsx b/src/StickerPack/page/StickerPack/index.tsx index 59d0059a..177be291 100644 --- a/src/StickerPack/page/StickerPack/index.tsx +++ b/src/StickerPack/page/StickerPack/index.tsx @@ -37,7 +37,7 @@ function StickerPack() { const handleClickDone = () => { navigate(`/sticker-attach/${bookUuId}`, { - state: { sticker: selectedStickerData }, + state: { sticker: selectedStickerData, replace: true }, }); }; From 85dce46f28f2e9ccd053531e6dff7b084dd73365 Mon Sep 17 00:00:00 2001 From: jungwoo3490 Date: Sat, 20 Jan 2024 04:27:25 +0900 Subject: [PATCH 8/8] =?UTF-8?q?fix/UX=EB=9D=BC=EC=9D=B4=ED=8C=85=20?= =?UTF-8?q?=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/SelectBook/components/MakeLecueBookButton/index.tsx | 2 +- src/SelectBook/page/SelectBookPage/index.tsx | 2 +- src/Target/page/TargetPage/index.tsx | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/SelectBook/components/MakeLecueBookButton/index.tsx b/src/SelectBook/components/MakeLecueBookButton/index.tsx index bd50a34d..321d6b06 100644 --- a/src/SelectBook/components/MakeLecueBookButton/index.tsx +++ b/src/SelectBook/components/MakeLecueBookButton/index.tsx @@ -10,7 +10,7 @@ function MakeLecueBookButton({ isActive, onClick }: MakeLecueBookButtonProps) { return ( ); diff --git a/src/SelectBook/page/SelectBookPage/index.tsx b/src/SelectBook/page/SelectBookPage/index.tsx index 82412dc3..bd18426b 100644 --- a/src/SelectBook/page/SelectBookPage/index.tsx +++ b/src/SelectBook/page/SelectBookPage/index.tsx @@ -35,7 +35,7 @@ function SelectBookPage() { return ( -
+
{isClickedSelectButton ? ( diff --git a/src/Target/page/TargetPage/index.tsx b/src/Target/page/TargetPage/index.tsx index b601cbb4..221311bf 100644 --- a/src/Target/page/TargetPage/index.tsx +++ b/src/Target/page/TargetPage/index.tsx @@ -47,6 +47,8 @@ function TargetPage() { }; } + sessionStorage.setItem('name', name); + navigate('/select-book', { state: { presignedFileName: presignedFileName, name: name }, });