feat: same code to render from both client and server

This commit is contained in:
Pihkaal
2024-09-30 05:13:38 +02:00
parent 58d8342538
commit fafbc9253e
7 changed files with 1572 additions and 154 deletions

13
utils/settings.ts Normal file
View 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),
});