Skip to content

Commit

Permalink
fix login & logout
Browse files Browse the repository at this point in the history
  • Loading branch information
Seania committed Jan 19, 2023
1 parent d6df3b2 commit f885b9c
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 7 deletions.
1 change: 0 additions & 1 deletion src/lib/components/Nav.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,6 @@
</div>
{/if}
</nav>

<style lang="scss">
:global {
svg {
Expand Down
6 changes: 0 additions & 6 deletions src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,6 @@
themeColorElement.setAttribute('content', color);
});
// 로그아웃 시 상단 nav 반영 안 되는 점 수정
client.subscribe((value) => {
if (!value.user) {
data.user = undefined;
}
});
});
page.subscribe(async () => {
Expand Down
1 change: 1 addition & 0 deletions src/routes/user/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
ky.post('/user/logout')
.then(() => goto('/'))
.then(() => {
delete data.user;
$client.user = undefined;
});
}
Expand Down

0 comments on commit f885b9c

Please sign in to comment.