refactor phase 7-8

This commit is contained in:
alorig
2025-11-20 22:40:18 +05:00
parent 45dc0d1fa2
commit 3e142afc7a
11 changed files with 695 additions and 74 deletions

View File

@@ -117,12 +117,19 @@ export default function Home() {
const toast = useToast();
const { activeSite } = useSiteStore();
const { activeSector } = useSectorStore();
const { isGuideDismissed, showGuide } = useOnboardingStore();
const { isGuideDismissed, showGuide, loadFromBackend } = useOnboardingStore();
const [insights, setInsights] = useState<AppInsights | null>(null);
const [loading, setLoading] = useState(true);
const [lastUpdated, setLastUpdated] = useState<Date>(new Date());
// Load guide state from backend on mount
useEffect(() => {
loadFromBackend().catch(() => {
// Silently fail - local state will be used
});
}, [loadFromBackend]);
// Show guide on first visit if not dismissed
useEffect(() => {
if (!isGuideDismissed) {