mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-04 05:12:38 +02:00
19 lines
477 B
TypeScript
19 lines
477 B
TypeScript
import { atom } from "jotai";
|
|
|
|
interface ActionLogSheetState {
|
|
open: boolean;
|
|
threadId: number | null;
|
|
}
|
|
|
|
export const actionLogSheetAtom = atom<ActionLogSheetState>({
|
|
open: false,
|
|
threadId: null,
|
|
});
|
|
|
|
export const openActionLogSheetAtom = atom(null, (_get, set, threadId: number) => {
|
|
set(actionLogSheetAtom, { open: true, threadId });
|
|
});
|
|
|
|
export const closeActionLogSheetAtom = atom(null, (_get, set) => {
|
|
set(actionLogSheetAtom, { open: false, threadId: null });
|
|
});
|