Skip to content

Commit

Permalink
Feat : Add logout cursor and login alert
Browse files Browse the repository at this point in the history
- #8
  • Loading branch information
carboxaminoo committed Mar 5, 2024
1 parent 2f9ca56 commit 67a2481
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion mz_v1_front/src/components/header_login.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ style="
>
About us
</a>
<a
<a href="/"
on:click={handleLogout}
style="
color: var(--7b95b7, #6b6b6b);
Expand Down
2 changes: 2 additions & 0 deletions mz_v1_front/src/routes/login/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
// 토큰과 이메일을 로컬 스토리지에 저장
localStorage.setItem('auth_token', token);
alert(`로그인 성공!`);
goto(targetPath); // 사용자를 홈 페이지로 리다이렉트
} else {
Expand Down

0 comments on commit 67a2481

Please sign in to comment.