fix: disable subscribe button if no jwt
This commit is contained in:
1 parent
b2cbb29260
commit
e1915fe708
1 file changed
+2
-1
@@ -13,6 +13,7 @@
|
||||
import FormattedNumber from '$lib/components/util/FormattedNumber.svelte'
|
||||
import { Button } from 'mono-svelte'
|
||||
import { isSubscribed } from '$lib/util.js'
|
||||
import { profile } from '$lib/auth.js'
|
||||
|
||||
export let community: CommunityView
|
||||
</script>
|
||||
@@ -31,7 +32,7 @@
|
||||
<div class="ml-auto">
|
||||
<Subscribe {community} let:subscribe let:subscribing>
|
||||
<Button
|
||||
disabled={subscribing}
|
||||
disabled={subscribing || !$profile?.jwt}
|
||||
loading={subscribing}
|
||||
on:click={async () => {
|
||||
const res = await subscribe()
|
||||
|
||||
Reference in new issue
Block a user