refactor(ux): consolidate BMAD skills, update design system, and clean up Prisma generated client

This commit is contained in:
Sepehr Ramezani
2026-04-19 19:21:27 +02:00
parent 5296c4da2c
commit 25529a24b8
2476 changed files with 127934 additions and 101962 deletions

View File

@@ -6,6 +6,7 @@ import { revalidatePath, updateTag } from 'next/cache'
export type UserSettingsData = {
theme?: 'light' | 'dark' | 'auto' | 'sepia' | 'midnight' | 'blue'
cardSizeMode?: 'variable' | 'uniform'
}
/**
@@ -48,11 +49,12 @@ const getCachedUserSettings = unstable_cache(
try {
const user = await prisma.user.findUnique({
where: { id: userId },
select: { theme: true }
select: { theme: true, cardSizeMode: true }
})
return {
theme: (user?.theme || 'light') as 'light' | 'dark' | 'auto' | 'sepia' | 'midnight' | 'blue'
theme: (user?.theme || 'light') as 'light' | 'dark' | 'auto' | 'sepia' | 'midnight' | 'blue',
cardSizeMode: (user?.cardSizeMode || 'variable') as 'variable' | 'uniform'
}
} catch (error) {
console.error('Error getting user settings:', error)
@@ -75,7 +77,8 @@ export async function getUserSettings(userId?: string) {
if (!id) {
return {
theme: 'light' as const
theme: 'light' as const,
cardSizeMode: 'variable' as const
}
}