Skip to content

AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents

511 B
Raw Blame
import { create } from 'zustand';

type ApErrorDialogParams = {
  title: string;
  description: React.ReactNode;
  error: unknown;
  technicalDetailsDefaultOpen?: boolean;
};
interface ApErrorDialogStore {
  params: ApErrorDialogParams | null;
  openDialog: (params: ApErrorDialogParams) => void;
  closeDialog: () => void;
}

export const useApErrorDialogStore = create<ApErrorDialogStore>((set) => ({
  params: null,
  openDialog: (params) => set({ params }),
  closeDialog: () => set({ params: null }),
}));