feat: comment filter

This commit is contained in:
DIYgod 2023-06-19 19:08:55 +01:00
parent 5c5957d690
commit c57dd5e23f
No known key found for this signature in database
3 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,4 @@
{
"latest": [151, 53994, 54570, 54481, 54537, 54302, 53944, 55768, 55855, 56592, 54986]
"latest": [151, 53994, 54570, 54481, 54537, 54302, 53944, 55768, 55855, 56592, 54986],
"comment": [54986]
}

View File

@ -1,5 +1,6 @@
"use client"
// TODO
import { Virtuoso } from "react-virtuoso"
import { CommentInput } from "~/components/common/CommentInput"

View File

@ -17,6 +17,8 @@ import { getKeys, getStorage } from "~/lib/storage"
import { ExpandedNote, PageVisibilityEnum } from "~/lib/types"
import { client } from "~/queries/graphql"
import filter from "../../data/filter.json"
export async function checkPageSlug(input: {
slug: string
characterId?: number
@ -609,6 +611,10 @@ export async function getComments({
list: [],
}
res.list = res.list.filter(
(item) => !filter.comment.includes(item.characterId),
)
return res
}