mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-23 19:05:16 +02:00
19 lines
484 B
TypeScript
19 lines
484 B
TypeScript
import { atom } from "jotai";
|
|
|
|
interface ActionLogDialogState {
|
|
open: boolean;
|
|
threadId: number | null;
|
|
}
|
|
|
|
export const actionLogDialogAtom = atom<ActionLogDialogState>({
|
|
open: false,
|
|
threadId: null,
|
|
});
|
|
|
|
export const openActionLogDialogAtom = atom(null, (_get, set, threadId: number) => {
|
|
set(actionLogDialogAtom, { open: true, threadId });
|
|
});
|
|
|
|
export const closeActionLogDialogAtom = atom(null, (_get, set) => {
|
|
set(actionLogDialogAtom, { open: false, threadId: null });
|
|
});
|