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:
1 parent
8c6ff77fac
commit
5651ad475d
83 files changed
+395
-469
No files matched your search
@@ -1,7 +1,8 @@
|
||||
import { getInstance } from '$lib/lemmy.js'
|
||||
import { profile } from '$lib/auth.svelte.js'
|
||||
import { redirect } from '@sveltejs/kit'
|
||||
import { get } from 'svelte/store'
|
||||
|
||||
export function load({ params }) {
|
||||
// If you somehow got to /comment/instance, it likely means you passed in an ID, not an instance.
|
||||
redirect(302, `/comment/${getInstance()}/${params.instance}`)
|
||||
redirect(302, `/comment/${profile.data.instance}/${params.instance}`)
|
||||
}
|
||||
Reference in new issue
Block a user