mirror of
https://github.com/kilyabin/psysonic.git
synced 2026-07-22 06:25:41 +00:00
b4bb40802d
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
20 lines
559 B
TypeScript
20 lines
559 B
TypeScript
import { create } from 'zustand';
|
|
|
|
interface HelpModalStore {
|
|
isOpen: boolean;
|
|
open: () => void;
|
|
close: () => void;
|
|
}
|
|
|
|
/**
|
|
* App-wide toggle for the Orbit help modal. Two triggers — the launch
|
|
* popover "How does this work?" entry and the in-session bar help button
|
|
* — write to the same store so they share the one rendered modal. Not
|
|
* persisted; resets to closed on reload.
|
|
*/
|
|
export const useHelpModalStore = create<HelpModalStore>(set => ({
|
|
isOpen: false,
|
|
open: () => set({ isOpen: true }),
|
|
close: () => set({ isOpen: false }),
|
|
}));
|