(fn: T)
| 9 | const AppThemeSchema = z.enum(['light', 'dark']).catch('light'); |
| 10 | |
| 11 | const clientOnly = <T extends (...args: any[]) => void>(fn: T) => { |
| 12 | if (typeof window === 'undefined') return (() => {}) as unknown as T; |
| 13 | return fn; |
| 14 | }; |
| 15 | |
| 16 | export type UserTheme = z.infer<typeof UserThemeSchema>; |
| 17 | export type AppTheme = z.infer<typeof AppThemeSchema>; |