Skip to content

Commit 4aa97bd

Browse files
authored
fix: join-complete 보드 이동 로직 수정 (#145)
fix: join-complete 보드 이동 수정
1 parent 811f730 commit 4aa97bd

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

src/pages/joinPage/pages/join-complete-page.tsx

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { useAuthStore } from "@/stores/useAuthStore";
77

88
export default function JoinCompletePage() {
99
const navigate = useNavigate();
10-
const { isLoggedIn, checkAuth, hasFetchedAuth } = useAuthStore();
10+
const { isLoggedIn, checkAuth, hasFetchedAuth, boardShare } = useAuthStore();
1111

1212
useEffect(() => {
1313
if (!hasFetchedAuth) {
@@ -20,6 +20,19 @@ export default function JoinCompletePage() {
2020
navigate("/");
2121
return;
2222
}
23+
24+
if (!boardShare?.boardId) {
25+
// 보드 정보가 없으면 인증을 다시 시도
26+
void checkAuth({ force: true }).then((data) => {
27+
if (data?.boardId) {
28+
navigate("/board");
29+
} else {
30+
navigate("/join/nickname");
31+
}
32+
});
33+
return;
34+
}
35+
2336
navigate("/board");
2437
};
2538

@@ -35,7 +48,7 @@ export default function JoinCompletePage() {
3548
}
3649
showBackButton={false}
3750
bottomContent={
38-
<NavigationButton className="w-full" onClick={handleToBoard}>
51+
<NavigationButton className="w-full" active={true} onClick={handleToBoard}>
3952
다음으로
4053
</NavigationButton>
4154
}

0 commit comments

Comments
 (0)