Files
ProjectE/apps/web/lib/stores/use-create-dialog-store.ts
T
bot-hermes 953a947874 fix: resolve 15+ UX issues across the full app
- CreateItemDialog: shared Zustand store for dialog state
- TopBar: use store instead of router.push navigation
- TaskDetailPanel: dynamic domain fetch from /api/domains
- TodayTasksWidget: domain name resolution from UUIDs
- ProjectProgressWidget: fetch real progress, default to 0
- Calendar page: domain filter fetches from API dynamically
- Habits page: edit/delete dropdown with AlertDialog
- Projects page: domain name display + delete button
- Notes page: domain picker on creation, names in list
- Settings domains: add color picker input
- Tasks list view: MoreHorizontal wired to edit/delete
- HabitCard: domain resolution + edit/delete dropdown
- PocketBase compat: add JSDoc migration comment
2026-07-25 02:22:01 +00:00

18 lines
448 B
TypeScript

import { create } from "zustand";
type ItemType = "task" | "project" | "habit" | null;
interface CreateDialogState {
type: ItemType;
open: boolean;
openCreate: (type: ItemType) => void;
closeCreate: () => void;
}
export const useCreateDialogStore = create<CreateDialogState>((set) => ({
type: null,
open: false,
openCreate: (type: ItemType) => set({ type, open: true }),
closeCreate: () => set({ type: null, open: false }),
}));