Skip to content

Commit 6a47e5c

Browse files
committed
refact: 메인 페이지에서는 새로고침, 이외의 페이지에서는 메인 페이지로 리디렉팅하는 로직으로 수정
1 parent abf7b92 commit 6a47e5c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/pages/home/ui/MainPage.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,11 @@ const MainPage = () => {
2727
}));
2828

2929
const handleRefresh = () => {
30-
navigate('/');
31-
window.location.reload();
30+
if (location.pathname === '/') {
31+
window.location.reload();
32+
} else {
33+
navigate('/');
34+
}
3235
};
3336

3437
return (

0 commit comments

Comments
 (0)