From 6c0080ab1cf7c81d4249cd44391f3b48720ce77a Mon Sep 17 00:00:00 2001 From: gyeongza Date: Fri, 19 Jul 2024 16:21:54 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=9E=90=EC=84=B8=ED=9E=88=20=EB=B3=B4?= =?UTF-8?q?=EA=B8=B0=20=EB=A7=81=ED=81=AC=EC=97=90=EC=84=9C=20=EB=92=A4?= =?UTF-8?q?=EB=A1=9C=EA=B0=80=EA=B8=B0=20=EC=95=88=EB=90=98=EB=8A=94=20?= =?UTF-8?q?=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/shared/components/Header/HeaderWithBackRoute/index.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/shared/components/Header/HeaderWithBackRoute/index.tsx b/src/shared/components/Header/HeaderWithBackRoute/index.tsx index c03ccee..57f65d9 100644 --- a/src/shared/components/Header/HeaderWithBackRoute/index.tsx +++ b/src/shared/components/Header/HeaderWithBackRoute/index.tsx @@ -5,9 +5,12 @@ const HeaderWithBackRoute = () => { const router = useRouter(); const goToBackPage = () => { - router.back(); + if (window.history.length > 1) { + router.back(); + } else { + router.push('/category/macbook_air'); + } }; - return (