Generated by Spark: Fix all reported errors.

This commit is contained in:
2026-01-16 02:05:30 +00:00
committed by GitHub
parent 97530c2c9b
commit ac7e8c03af
2 changed files with 8 additions and 2 deletions

View File

@@ -156,7 +156,7 @@ function App() {
const safeFiles = files || []
const safeModels = models || []
const safeComponents = components || []
const safeTheme = theme || DEFAULT_THEME
const safeTheme = (theme && theme.variants && theme.variants.length > 0) ? theme : DEFAULT_THEME
const safePlaywrightTests = playwrightTests || []
const safeStorybookStories = storybookStories || []
const safeUnitTests = unitTests || []
@@ -164,6 +164,12 @@ function App() {
const safeNextjsConfig = nextjsConfig || DEFAULT_NEXTJS_CONFIG
const safeNpmSettings = npmSettings || DEFAULT_NPM_SETTINGS
useEffect(() => {
if (!theme || !theme.variants || theme.variants.length === 0) {
setTheme(DEFAULT_THEME)
}
}, [theme, setTheme])
const { errors: autoDetectedErrors } = useAutoRepair(safeFiles, false)
useKeyboardShortcuts([

View File

@@ -39,7 +39,7 @@ export function ProjectDashboard({
const totalFiles = files.length
const totalModels = models.length
const totalComponents = components.length
const totalThemeVariants = theme.variants.length
const totalThemeVariants = theme?.variants?.length || 0
const totalEndpoints = flaskConfig.blueprints.reduce((acc, bp) => acc + bp.endpoints.length, 0)
const totalTests = playwrightTests.length + storybookStories.length + unitTests.length