import { Dialog, Transition } from '@headlessui/react'; import { Fragment } from 'react'; import { useHotkeys } from 'react-hotkeys-hook'; import { Button } from '@shared/button'; import { Composer, ComposerUser } from '@shared/composer'; import { CancelIcon, ChevronDownIcon, ChevronRightIcon, ComposeIcon, } from '@shared/icons'; import { useComposer } from '@stores/composer'; import { COMPOSE_SHORTCUT } from '@stores/shortcuts'; import { useAccount } from '@utils/hooks/useAccount'; 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 ( <>
{account && }
New Post
); }