Skip to content

Commit 30c0a43

Browse files
committed
fix login detection
1 parent 3f161a2 commit 30c0a43

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/lib/components/SideBar.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import { goto } from '$app/navigation';
44
import { page } from '$app/state';
55
import { createLibrary } from '$lib/library';
6-
import { SavedUser } from '$lib/store';
6+
import { SavedUser, isLoggedIn } from '$lib/store';
77
88
const isActive = (path: string) => page.url.pathname === path;
99
</script>
@@ -15,7 +15,7 @@
1515
<div class="mt-3 mb-3 flex flex-col items-center justify-center gap-2">
1616
<button
1717
type="button"
18-
onclick={() => goto('/settings')}
18+
onclick={() => goto($isLoggedIn ? '/settings' : '/login')}
1919
class="bg-primary text-on-primary hover:bg-primary/90 flex h-12 w-12 cursor-pointer items-center justify-center rounded-full transition-colors"
2020
>
2121
{#if $SavedUser?.pfp}

src/routes/playlists/playlist/[slug]/+page.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,12 +210,12 @@
210210
/>
211211
{:catch}
212212
<div
213-
class="bg-surface-container mx-auto aspect-square w-full max-w-sm rounded-lg md:mx-0"
213+
class="bg-surface-container aspect-square w-full max-w-sm rounded-lg"
214214
></div>
215215
{/await}
216216
{:else}
217217
<div
218-
class="bg-surface-container mx-auto aspect-square w-full max-w-sm rounded-lg md:mx-0"
218+
class="bg-surface-container aspect-square w-full max-w-sm rounded-lg"
219219
></div>
220220
{/if}
221221
{#if editModeOn}

0 commit comments

Comments
 (0)