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 -4
View File
@@ -2,7 +2,7 @@
import Button from '$lib/components/input/Button.svelte'
import CommentItem from '$lib/components/lemmy/comment/CommentItem.svelte'
import Post from '$lib/components/lemmy/post/Post.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 { isCommentReport, isPostReport } from '$lib/lemmy/item.js'
import type {
@@ -38,7 +38,7 @@
toast({
content: `${resolved ? 'Resolved' : 'Unresolved'} that report.`,
type: ToastType.success,
type: 'success',
})
} else if (isPostReport(item)) {
await getClient().resolvePostReport({
@@ -50,7 +50,7 @@
resolved = !resolved
toast({
content: `${resolved ? 'Resolved' : 'Unresolved'} that report.`,
type: ToastType.success,
type: 'success',
})
}
@@ -65,7 +65,7 @@
} catch (err) {
toast({
content: err as any,
type: ToastType.error,
type: 'error',
})
}