Skip to content
Source
Sign inSign up
fuko/trytanstackdb.com
Open History to see the last commit

inspector-store.ts

16 lines475 Bytes

1import { createStore, useStore } from "@/lib/store";
2​
3/**
4 * Whether the request inspector drawer is open under the app (wide screens).
5 * On phones the inspector is part of the app sheet's Network view instead
6 * (see `app-sheet-store.ts`).
7 */
8export const inspectorOpenStore = createStore(false);
9​
10export function setInspectorOpen(open: boolean) {
11 inspectorOpenStore.set(open);
13​
14export function useIsInspectorOpen(): boolean {
15 return useStore(inspectorOpenStore);