import React, { useState, ReactElement } from "react"; import { observer } from "mobx-react"; // layouts // components // ui import { Search } from "lucide-react"; import { Input } from "@plane/ui"; // icons import { PageHead } from "@/components/core"; import { GlobalIssuesHeader } from "@/components/headers"; import { GlobalDefaultViewListItem, GlobalViewsList } from "@/components/workspace"; // types // constants import { DEFAULT_GLOBAL_VIEWS_LIST } from "@/constants/workspace"; // hooks import { useWorkspace } from "@/hooks/store"; import { AppLayout } from "@/layouts/app-layout"; import { NextPageWithLayout } from "@/lib/types"; const WorkspaceViewsPage: NextPageWithLayout = observer(() => { const [query, setQuery] = useState(""); // store const { currentWorkspace } = useWorkspace(); // derived values const pageTitle = currentWorkspace?.name ? `${currentWorkspace?.name} - All Views` : undefined; return ( <>
setQuery(e.target.value)} placeholder="Search" mode="true-transparent" />
{DEFAULT_GLOBAL_VIEWS_LIST.filter((v) => v.label.toLowerCase().includes(query.toLowerCase())).map( (option) => ( ) )}
); }); WorkspaceViewsPage.getLayout = function getLayout(page: ReactElement) { return }>{page}; }; export default WorkspaceViewsPage;