Load areas into store (#913)

This commit is contained in:
Chris 2026-03-06 08:46:07 +02:00 committed by GitHub
parent aa686702e9
commit 3a1b4ca1b4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -164,6 +164,15 @@ const Layout: React.FC<LayoutProps> = ({
loadProjects();
}, [projects.length, isProjectsLoading, setProjects]);
useEffect(() => {
// Load areas into global store if not already loaded
const { hasLoaded, isLoading, loadAreas } =
useStore.getState().areasStore;
if (!hasLoaded && !isLoading) {
loadAreas();
}
}, []);
const openNoteModal = (note: Note | null = null) => {
setSelectedNote(note);
setIsNoteModalOpen(true);