import React from "react"; import { useRouter } from "next/router"; // hooks import useMyIssuesFilters from "hooks/my-issues/use-my-issues-filter"; // components import { MyIssuesSelectFilters } from "components/issues"; // ui import { Tooltip } from "components/ui"; // icons import { FormatListBulletedOutlined } from "@mui/icons-material"; import { CreditCard } from "lucide-react"; // helpers import { replaceUnderscoreIfSnakeCase } from "helpers/string.helper"; import { checkIfArraysHaveSameElements } from "helpers/array.helper"; // types import { TIssueViewOptions } from "types"; const issueViewOptions: { type: TIssueViewOptions; Icon: any }[] = [ { type: "list", Icon: FormatListBulletedOutlined, }, { type: "spreadsheet", Icon: CreditCard, }, ]; export const MyIssuesViewOptions: React.FC = () => { const router = useRouter(); const { workspaceSlug, globalViewId } = router.query; const { displayFilters, setDisplayFilters, filters, setFilters } = useMyIssuesFilters( workspaceSlug?.toString() ); const workspaceViewPathName = ["workspace-views/all-issues"]; const isWorkspaceViewPath = workspaceViewPathName.some((pathname) => router.pathname.includes(pathname) ); const showFilters = isWorkspaceViewPath || globalViewId; return (