refactor phase 7-8
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user