add network to account

This commit is contained in:
Ren Amamiya
2023-08-04 15:38:38 +07:00
parent 4c7826bbb3
commit 373a0f0608
13 changed files with 103 additions and 89 deletions

View File

@@ -18,14 +18,10 @@ export function ComposerModal() {
const { account } = useAccount();
const [toggle, open] = useComposer((state) => [state.toggleModal, state.open]);
const closeModal = () => {
toggle(false);
};
useHotkeys(COMPOSE_SHORTCUT, () => toggle(true));
return (
<Dialog.Root open={open}>
<Dialog.Root open={open} onOpenChange={toggle}>
<Dialog.Trigger asChild>
<button
type="button"
@@ -51,7 +47,7 @@ export function ComposerModal() {
</div>
</div>
<Dialog.Close
onClick={() => closeModal()}
onClick={() => toggle(false)}
className="inline-flex h-8 w-8 items-center justify-center rounded-md hover:bg-zinc-800"
>
<CancelIcon className="h-5 w-5 text-white/50" />