Skip to content

Commit

Permalink
fix: 자세히 보기 링크에서 뒤로가기 안되는 오류 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
gyeongza committed Jul 19, 2024
1 parent d8e2fa2 commit 6c0080a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/shared/components/Header/HeaderWithBackRoute/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<header className="w-full flex items-center">
<nav className="w-[1080px] h-[70px] flex items-center justify-between mx-auto border-b">
Expand Down

0 comments on commit 6c0080a

Please sign in to comment.