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

@@ -4,7 +4,7 @@
import Comment from '$lib/components/lemmy/comment/Comment.svelte'
import Post from '$lib/components/lemmy/post/Post.svelte'
import Modal from '$lib/components/ui/modal/Modal.svelte'
import { ToastType, toast } from '$lib/components/ui/toasts/toasts.js'
import { toast } from '$lib/components/ui/toasts/toasts.js'
import { getClient } from '$lib/lemmy.js'
import { isComment, isPost } from '$lib/lemmy/item.js'
import type { CommentView, PostView } from 'lemmy-js-client'
@@ -54,12 +54,12 @@
content: `Successfully ${
removed ? 'restored' : 'removed'
} that submission.`,
type: ToastType.success,
type: 'success',
})
} catch (err) {
toast({
content: err as any,
type: ToastType.error,
type: 'error',
})
}