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 FormattedNumber from '$lib/components/util/FormattedNumber.svelte'
|
||||||
import { Button } from 'mono-svelte'
|
import { Button } from 'mono-svelte'
|
||||||
import { isSubscribed } from '$lib/util.js'
|
import { isSubscribed } from '$lib/util.js'
|
||||||
|
import { profile } from '$lib/auth.js'
|
||||||
|
|
||||||
export let community: CommunityView
|
export let community: CommunityView
|
||||||
</script>
|
</script>
|
||||||
@@ -31,7 +32,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