feat: add profile dialog
This commit is contained in:
@@ -0,0 +1 @@
|
||||
export { ProfileDialog } from './profile-dialog';
|
||||
@@ -0,0 +1,12 @@
|
||||
import { Dialog } from '@vegaprotocol/ui-toolkit';
|
||||
import { useProfileDialogStore } from '../../stores/profile-dialog-store';
|
||||
|
||||
export const ProfileDialog = () => {
|
||||
const open = useProfileDialogStore((store) => store.open);
|
||||
const setOpen = useProfileDialogStore((store) => store.setOpen);
|
||||
return (
|
||||
<Dialog open={open} onChange={setOpen}>
|
||||
<div>Content</div>
|
||||
</Dialog>
|
||||
);
|
||||
};
|
||||
@@ -8,6 +8,7 @@ import {
|
||||
} from '@vegaprotocol/web3';
|
||||
import { WelcomeDialog } from '../components/welcome-dialog';
|
||||
import { VegaWalletConnectDialog } from '../components/vega-wallet-connect-dialog';
|
||||
import { ProfileDialog } from '../components/profile-dialog';
|
||||
|
||||
const DialogsContainer = () => {
|
||||
const { isOpen, id, trigger, setOpen } = useAssetDetailsDialogStore();
|
||||
@@ -24,6 +25,7 @@ const DialogsContainer = () => {
|
||||
<WelcomeDialog />
|
||||
<Web3ConnectUncontrolledDialog />
|
||||
<WithdrawalApprovalDialogContainer />
|
||||
<ProfileDialog />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
import { create } from 'zustand';
|
||||
|
||||
interface ProfileDialogStore {
|
||||
open: boolean;
|
||||
setOpen: (open: boolean) => void;
|
||||
}
|
||||
|
||||
export const useProfileDialogStore = create<ProfileDialogStore>((set) => ({
|
||||
open: false,
|
||||
setOpen: (open) => set({ open }),
|
||||
}));
|
||||
Reference in New Issue
Block a user