diff options
| -rw-r--r-- | src/content.config.ts | 2 | ||||
| -rw-r--r-- | src/lib/utils.ts | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/content.config.ts b/src/content.config.ts index d18d704..4f61d5c 100644 --- a/src/content.config.ts +++ b/src/content.config.ts @@ -10,7 +10,7 @@ const events = defineCollection({ date: z.coerce.date(), order: z.number().optional(), image: image().optional(), - type: z.string().optional(), + type: z.string(), draft: z.boolean().optional(), }), }) diff --git a/src/lib/utils.ts b/src/lib/utils.ts index e2e005b..e0c94ca 100644 --- a/src/lib/utils.ts +++ b/src/lib/utils.ts @@ -36,12 +36,12 @@ export function getHeadingMargin(depth: number): string { return margins[depth] || '' } export function capitalizeFirstLetter(val: string): string { - return String(val).charAt(0).toUpperCase() + String(val).slice(1); + return String(val).charAt(0).toUpperCase() + String(val).slice(1) } -export const iconMappings = { - "workshop": "lucide:hammer", - "competition": "lucide:trophy", - "game": "lucide:gamepad-2", - "quiz": "lucide:brain" +export const iconMappings: Record<string, string> = { + workshop: 'lucide:hammer', + competition: 'lucide:trophy', + game: 'lucide:gamepad-2', + quiz: 'lucide:brain', } |
