import React from "react"; import { useRouter } from "next/router"; // headless ui import { Disclosure, Popover, Transition } from "@headlessui/react"; // icons import { ChevronDownIcon, PlusIcon, RectangleStackIcon } from "@heroicons/react/24/outline"; // layouts import AppLayout from "layouts/app-layout"; // hooks import useIssues from "hooks/use-issues"; // ui import { Spinner, EmptySpace, EmptySpaceItem, PrimaryButton } from "components/ui"; import { Breadcrumbs, BreadcrumbItem } from "components/breadcrumbs"; // hooks import useIssuesProperties from "hooks/use-issue-properties"; // types import { IIssue, Properties } from "types"; // components import { MyIssuesListItem } from "components/issues"; // helpers import { replaceUnderscoreIfSnakeCase } from "helpers/string.helper"; // types import type { NextPage } from "next"; const MyIssuesPage: NextPage = () => { const router = useRouter(); const { workspaceSlug } = router.query; // fetching user issues const { myIssues } = useIssues(workspaceSlug as string); const [properties, setProperties] = useIssuesProperties( workspaceSlug ? (workspaceSlug as string) : undefined, undefined ); return ( <> } right={
{myIssues && myIssues.length > 0 && ( {({ open }) => ( <> View

Properties

{Object.keys(properties).map((key) => ( ))}
)}
)} { const e = new KeyboardEvent("keydown", { key: "c" }); document.dispatchEvent(e); }} > Add Issue
} >
{myIssues ? ( <> {myIssues.length > 0 ? (
{({ open }) => (

My Issues

{myIssues.length}
{myIssues.map((issue: IIssue) => ( ))}
)}
) : (
Use
C
shortcut to create a new issue } Icon={PlusIcon} action={() => { const e = new KeyboardEvent("keydown", { key: "c", }); document.dispatchEvent(e); }} />
)} ) : (
)}
); }; export default MyIssuesPage;