fix: disable subscribe button when jwt is null
This commit is contained in:
1 parent
f43fc4acb6
commit
343e3cf78a
1 file changed
+2
-1
@@ -18,6 +18,7 @@
|
|||||||
import { addSubscription } from '$lib/lemmy/user.js'
|
import { addSubscription } from '$lib/lemmy/user.js'
|
||||||
import Link from '$lib/components/input/Link.svelte'
|
import Link from '$lib/components/input/Link.svelte'
|
||||||
import { LINKED_INSTANCE_URL } from '$lib/instance.js'
|
import { LINKED_INSTANCE_URL } from '$lib/instance.js'
|
||||||
|
import { profile } from '$lib/auth.js'
|
||||||
|
|
||||||
export let data
|
export let data
|
||||||
|
|
||||||
@@ -101,7 +102,7 @@
|
|||||||
<div class="ml-auto">
|
<div class="ml-auto">
|
||||||
<Subscribe {community} let:subscribe let:subscribing>
|
<Subscribe {community} let:subscribe let:subscribing>
|
||||||
<Button
|
<Button
|
||||||
disabled={subscribing}
|
disabled={subscribing || !$profile?.jwt}
|
||||||
loading={subscribing}
|
loading={subscribing}
|
||||||
on:click={async () => {
|
on:click={async () => {
|
||||||
const res = await subscribe()
|
const res = await subscribe()
|
||||||
|
|||||||
Reference in new issue
Block a user