feat: switch to a string instead of enum

This commit is contained in:
Xyphyn committed 2023-08-02 14:22:27 -07:00
1 parent aeb727ae3b
commit 87612d6507
23 files changed
+92 -128

No files matched your search

@@ -5,7 +5,7 @@
import Avatar from '$lib/components/ui/Avatar.svelte'
import Card from '$lib/components/ui/Card.svelte'
import StickyCard from '$lib/components/ui/StickyCard.svelte'
import { ToastType, addToast } from '$lib/components/ui/toasts/toasts.js'
import { toast } from '$lib/components/ui/toasts/toasts.js'
import FormattedNumber from '$lib/components/util/FormattedNumber.svelte'
import RelativeDate from '$lib/components/util/RelativeDate.svelte'
import { getClient } from '$lib/lemmy.js'
@@ -39,7 +39,7 @@
follow: !subscribed,
})
} catch (error) {
addToast('Error', error as any, ToastType.error)
toast({ content: error as any, type: 'error' })
}
community_view.subscribed = subscribed ? 'NotSubscribed' : 'Subscribed'
@@ -58,7 +58,7 @@
block: !blocked,
})
} catch (error) {
addToast('Error', error as any, ToastType.error)
toast({ content: error as any, type: 'error' })
}
community_view.blocked = !blocked