Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

548 B
Raw Blame
import { create } from "zustand";

export type RelationPickerMode = "related" | "blocks" | "blockedBy" | "parent";

type RelationPickerRequest = { taskId: string; mode: RelationPickerMode };

type RelationPickerStore = {
  request: RelationPickerRequest | null;
  open: (taskId: string, mode: RelationPickerMode) => void;
  clear: () => void;
};

export const useRelationPickerStore = create<RelationPickerStore>((set) => ({
  request: null,
  open: (taskId, mode) => set({ request: { taskId, mode } }),
  clear: () => set({ request: null }),
}));