2022-06-01 14:21:36 +00:00
|
|
|
import type { SetState } from 'zustand';
|
|
|
|
import create from 'zustand';
|
|
|
|
|
|
|
|
interface GlobalStore {
|
|
|
|
vegaWalletConnectDialog: boolean;
|
|
|
|
setVegaWalletConnectDialog: (isOpen: boolean) => void;
|
|
|
|
vegaWalletManageDialog: boolean;
|
|
|
|
setVegaWalletManageDialog: (isOpen: boolean) => void;
|
2022-06-10 09:15:38 +00:00
|
|
|
vegaNetworkSwitcherDialog: boolean;
|
|
|
|
setVegaNetworkSwitcherDialog: (isOpen: boolean) => void;
|
2022-06-01 14:21:36 +00:00
|
|
|
landingDialog: boolean;
|
|
|
|
setLandingDialog: (isOpen: boolean) => void;
|
|
|
|
}
|
|
|
|
|
|
|
|
export const useGlobalStore = create((set: SetState<GlobalStore>) => ({
|
|
|
|
vegaWalletConnectDialog: false,
|
|
|
|
setVegaWalletConnectDialog: (isOpen: boolean) => {
|
|
|
|
set({ vegaWalletConnectDialog: isOpen });
|
|
|
|
},
|
|
|
|
vegaWalletManageDialog: false,
|
|
|
|
setVegaWalletManageDialog: (isOpen: boolean) => {
|
|
|
|
set({ vegaWalletManageDialog: isOpen });
|
|
|
|
},
|
2022-06-10 09:15:38 +00:00
|
|
|
vegaNetworkSwitcherDialog: false,
|
|
|
|
setVegaNetworkSwitcherDialog: (isOpen: boolean) => {
|
|
|
|
set({ vegaNetworkSwitcherDialog: isOpen });
|
|
|
|
},
|
2022-06-01 14:21:36 +00:00
|
|
|
landingDialog: false,
|
|
|
|
setLandingDialog: (isOpen: boolean) => {
|
|
|
|
set({ landingDialog: isOpen });
|
|
|
|
},
|
|
|
|
}));
|