refactor: create shared UI components and utilities

This commit is contained in:
Rasmus Q
2026-03-16 14:51:33 +00:00
parent 22cf68f1d7
commit 76219cb98f
8 changed files with 173 additions and 57 deletions
+2 -1
View File
@@ -93,8 +93,9 @@ export function sanitizeToken(token: string | null | undefined): string {
// Zod schemas for type-safe form validation
import { z } from 'zod';
import { CURRENCIES } from '$lib/utils/currency';
export const currencySchema = z.enum(['DKK', 'EUR', 'USD', 'SEK', 'NOK', 'GBP']);
export const currencySchema = z.enum(CURRENCIES);
export const itemSchema = z.object({
title: z.string().min(1, 'Title is required').max(255),