feat: same code to render from both client and server
This commit is contained in:
13
utils/settings.ts
Normal file
13
utils/settings.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { z } from "zod";
|
||||
|
||||
export const LOGOS = ["session", "instagram"] as const;
|
||||
|
||||
export const IMAGE_FORMATS = ["jpeg", "png", "webp"] as const;
|
||||
|
||||
export type ImageFormat = (typeof IMAGE_FORMATS)[number];
|
||||
|
||||
export const settingsSchema = z.object({
|
||||
format: z.enum(IMAGE_FORMATS).default("png"),
|
||||
logo: z.enum(LOGOS),
|
||||
content: z.string().min(1),
|
||||
});
|
||||
Reference in New Issue
Block a user