mirror of
https://github.com/johndoe6345789/low-code-react-app-b.git
synced 2026-04-24 13:44:54 +00:00
Generated by Spark: Fix all reported errors.
This commit is contained in:
@@ -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([
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user