mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-10-12 06:24:14 +00:00
17 lines
602 B
TypeScript
17 lines
602 B
TypeScript
import { create } from "zustand";
|
|
|
|
import type { JiraDispatchModalPayload } from "@/types/jira-dispatch";
|
|
|
|
interface JiraDispatchStoreState {
|
|
activePayload: JiraDispatchModalPayload | null;
|
|
openJiraDispatch: (payload: JiraDispatchModalPayload) => void;
|
|
closeJiraDispatch: () => void;
|
|
}
|
|
|
|
// Jira dispatch is ephemeral and globally hosted so every action uses one modal.
|
|
export const useJiraDispatchStore = create<JiraDispatchStoreState>((set) => ({
|
|
activePayload: null,
|
|
openJiraDispatch: (activePayload) => set({ activePayload }),
|
|
closeJiraDispatch: () => set({ activePayload: null }),
|
|
}));
|