From 8989c6911b37fda8d77d9950bf9239a5641c1105 Mon Sep 17 00:00:00 2001 From: godhyzzang <109357302+godhyzzang@users.noreply.github.com> Date: Mon, 16 Dec 2024 18:02:54 +0900 Subject: [PATCH 1/4] fix : change router.push to router.replace --- src/app/(default)/mypage/layout.tsx | 2 +- src/app/(fullscreen)/login/page.tsx | 2 +- src/app/not-found.tsx | 2 +- src/components/common/PointCover.tsx | 2 +- src/components/common/SearchComponent.tsx | 2 +- src/components/layout/MobileSearch.tsx | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/app/(default)/mypage/layout.tsx b/src/app/(default)/mypage/layout.tsx index f259380..196c48a 100644 --- a/src/app/(default)/mypage/layout.tsx +++ b/src/app/(default)/mypage/layout.tsx @@ -31,7 +31,7 @@ export default function MyPageLayout({ const isLogin = isLoginData?.data; const router = useRouter(); if (!isLogin) { - router.push('/login'); + router.replace('/login'); } return ( diff --git a/src/app/(fullscreen)/login/page.tsx b/src/app/(fullscreen)/login/page.tsx index 69ebdd2..7ef74d3 100644 --- a/src/app/(fullscreen)/login/page.tsx +++ b/src/app/(fullscreen)/login/page.tsx @@ -32,7 +32,7 @@ function Login() { console.log(`Redirecting to ${provider} OAuth login...`); const returnUrl = searchParams.get('returnUrl'); - router.push( + router.replace( `${BASE_URL}/oauth2/authorization/${provider}${ returnUrl ? `?returnUrl=${encodeURIComponent(returnUrl)}` : '' }`, diff --git a/src/app/not-found.tsx b/src/app/not-found.tsx index e8d8644..d98a192 100644 --- a/src/app/not-found.tsx +++ b/src/app/not-found.tsx @@ -28,7 +28,7 @@ export default function NotFoundPage() { diff --git a/src/components/common/PointCover.tsx b/src/components/common/PointCover.tsx index 09ca9fb..45cd45d 100644 --- a/src/components/common/PointCover.tsx +++ b/src/components/common/PointCover.tsx @@ -64,7 +64,7 @@ export default function PointCover({ data, children }: PointCoverProps) { const success = await reducePointMutation.mutateAsync(contentId); if (success) { setIsConfirmed(true); - router.push( + router.replace( data.contentType === 'READING' ? `/learn/reading/detail/${data.contentId}` : `/learn/listening/detail/${data.contentId}`, diff --git a/src/components/common/SearchComponent.tsx b/src/components/common/SearchComponent.tsx index 2e189aa..53d0749 100644 --- a/src/components/common/SearchComponent.tsx +++ b/src/components/common/SearchComponent.tsx @@ -28,7 +28,7 @@ export default function SearchComponent() { return; } - router.push(`/search?q=${encodeURIComponent(query)}`); + router.replace(`/search?q=${encodeURIComponent(query)}`); } }; diff --git a/src/components/layout/MobileSearch.tsx b/src/components/layout/MobileSearch.tsx index bd2255e..62473f4 100644 --- a/src/components/layout/MobileSearch.tsx +++ b/src/components/layout/MobileSearch.tsx @@ -42,7 +42,7 @@ export default function MobileSearch({ isOpen, setIsOpen }: MobileSearchProps) { return; } - router.push(`/search?q=${encodeURIComponent(query)}`); + router.replace(`/search?q=${encodeURIComponent(query)}`); setIsOpen(false); } }; From 5bc6bf42ba842f86dacef001ff56ce7b2895096f Mon Sep 17 00:00:00 2001 From: godhyzzang <109357302+godhyzzang@users.noreply.github.com> Date: Mon, 16 Dec 2024 18:03:08 +0900 Subject: [PATCH 2/4] =?UTF-8?q?fix=20:=20floating=20button=2020px=EC=94=A9?= =?UTF-8?q?=20=EC=98=AC=EB=A6=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../(default)/learn/listening/detail/ListeningDetailClient.tsx | 2 +- src/app/(default)/learn/reading/detail/ReadingDetailClient.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/(default)/learn/listening/detail/ListeningDetailClient.tsx b/src/app/(default)/learn/listening/detail/ListeningDetailClient.tsx index 1329a26..d2a78fd 100644 --- a/src/app/(default)/learn/listening/detail/ListeningDetailClient.tsx +++ b/src/app/(default)/learn/listening/detail/ListeningDetailClient.tsx @@ -346,7 +346,7 @@ export default function ListeningDetailClient({ onScrapToggle={handleScrapToggle} /> -