Hide posts tool (#2299)
* Set up hidden posts persisted state * Wrap moderatePost * Integrate hidden posts into moderation * Complete hide-post behaviors --------- Co-authored-by: Paul Frazee <pfrazee@gmail.com>
This commit is contained in:
parent
28e0df595f
commit
b199405134
12 changed files with 151 additions and 12 deletions
|
@ -108,6 +108,7 @@ export function transform(legacy: Partial<LegacySchema>): Schema {
|
|||
onboarding: {
|
||||
step: legacy.onboarding?.step || defaults.onboarding.step,
|
||||
},
|
||||
hiddenPosts: defaults.hiddenPosts,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -37,6 +37,7 @@ export const schema = z.object({
|
|||
onboarding: z.object({
|
||||
step: z.string(),
|
||||
}),
|
||||
hiddenPosts: z.array(z.string()).optional(), // should move to server
|
||||
})
|
||||
export type Schema = z.infer<typeof schema>
|
||||
|
||||
|
@ -66,4 +67,5 @@ export const defaults: Schema = {
|
|||
onboarding: {
|
||||
step: 'Home',
|
||||
},
|
||||
hiddenPosts: [],
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue