feat: use state based auth instead of store based (#488)

* misc: switch to state for auth

* fix: class based auth not working
This commit is contained in:
Xylight authored and GitHub committed 2025-02-08 13:49:09 -08:00
1 parent 8c6ff77fac
commit 5651ad475d
83 files changed
+395 -469

No files matched your search

@@ -23,21 +23,22 @@
alignment="left"
loading={switching}
loaderWidth={20}
selected={$profile?.id == prof.id}
selected={profile.data?.id == prof.id}
onclick={async () => {
switching = true
if ($profile?.id != prof.id) {
if (profile.data?.id != prof.id) {
await setUserID(prof.id)
}
await goto(page.url, {
invalidateAll: true,
})
console.log(page.url)
// await goto(page.url, {
// invalidateAll: true,
// })
switching = false
}}
class="w-full font-normal {$profile?.id == prof.id
class="w-full font-normal {profile.data?.id == prof.id
? '!bg-slate-100 dark:!bg-zinc-900'
: ''}"
>
@@ -46,11 +47,11 @@
profile={prof}
{index}
{guest}
selected={$profile?.id == prof.id}
selected={profile.data?.id == prof.id}
/>
{/snippet}
<span
class="inline-flex flex-col gap-0 {$profile?.id == prof.id
class="inline-flex flex-col gap-0 {profile.data?.id == prof.id
? 'font-semibold'
: ''}"
>