Merge caitlin/CRM_ENVR: AI chat ref+health, tips panel, cyberpunk theme, app-shell/bg improvements

This commit is contained in:
JCBSComputer
2026-07-01 09:36:04 +02:00
56 changed files with 2693 additions and 504 deletions
+4 -8
View File
@@ -47,13 +47,6 @@ export function WebsiteThemeProvider({ children }: { children: ReactNode }) {
const [loading, setLoading] = useState(true)
useEffect(() => {
const stored = getStoredTheme()
if (stored) {
setWebsiteThemeState(stored)
applyWebsiteTheme(stored)
setLoading(false)
return
}
fetch("/api/settings/website-theme")
.then((res) => (res.ok ? res.json() : null))
.then((data) => {
@@ -63,7 +56,10 @@ export function WebsiteThemeProvider({ children }: { children: ReactNode }) {
applyWebsiteTheme(theme)
})
.catch(() => {
applyWebsiteTheme("default")
const stored = getStoredTheme()
const theme = stored || "default"
setWebsiteThemeState(theme)
applyWebsiteTheme(theme)
})
.finally(() => setLoading(false))
}, [])