vega-frontend-monorepo/apps/trading/stores/global.ts
Art d271f28b82
feat: page title (660) (#1437)
* feat: page title (660)

* fix: trading-e2e home tests
2022-09-23 16:29:35 +02:00

24 lines
548 B
TypeScript

import create from 'zustand';
interface GlobalStore {
connectDialog: boolean;
networkSwitcherDialog: boolean;
landingDialog: boolean;
riskNoticeDialog: boolean;
marketId: string | null;
pageTitle: string | null;
update: (store: Partial<Omit<GlobalStore, 'update'>>) => void;
}
export const useGlobalStore = create<GlobalStore>((set) => ({
connectDialog: false,
networkSwitcherDialog: false,
landingDialog: false,
riskNoticeDialog: false,
marketId: null,
pageTitle: null,
update: (state) => {
set(state);
},
}));