mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
05de4d83f3
* chore: header refactor. * fix: core imports * chore: refactor profile activity header and fix all other header imports. * fix: import fixes * chore: header refactor. * fix: app dir header reimplementation * fix: removing parllel headers * fix: adding route groups to handle pages * fix: disabling sentry for temp * chore: update default exports in layouts & headers for consistency. * fix: bugfixes * fix: build errors --------- Co-authored-by: sriram veeraghanta <veeraghanta.sriram@gmail.com>
52 lines
1.8 KiB
TypeScript
52 lines
1.8 KiB
TypeScript
"use client";
|
|
|
|
import React, { useState } from "react";
|
|
import { observer } from "mobx-react";
|
|
// icons
|
|
import { Search } from "lucide-react";
|
|
// ui
|
|
import { Input } from "@plane/ui";
|
|
// components
|
|
import { PageHead } from "@/components/core";
|
|
import { GlobalDefaultViewListItem, GlobalViewsList } from "@/components/workspace";
|
|
// constants
|
|
import { DEFAULT_GLOBAL_VIEWS_LIST } from "@/constants/workspace";
|
|
// hooks
|
|
import { useWorkspace } from "@/hooks/store";
|
|
|
|
const WorkspaceViewsPage = observer(() => {
|
|
const [query, setQuery] = useState("");
|
|
// store
|
|
const { currentWorkspace } = useWorkspace();
|
|
// derived values
|
|
const pageTitle = currentWorkspace?.name ? `${currentWorkspace?.name} - All Views` : undefined;
|
|
|
|
return (
|
|
<>
|
|
<PageHead title={pageTitle} />
|
|
<div className="flex flex-col h-full w-full overflow-hidden">
|
|
<div className="flex h-11 w-full items-center gap-2.5 px-5 py-3 overflow-hidden border-b border-custom-border-200">
|
|
<Search className="text-custom-text-200" size={14} strokeWidth={2} />
|
|
<Input
|
|
className="w-full bg-transparent !p-0 text-xs leading-5 text-custom-text-200 placeholder:text-custom-text-400 focus:outline-none"
|
|
value={query}
|
|
onChange={(e) => setQuery(e.target.value)}
|
|
placeholder="Search"
|
|
mode="true-transparent"
|
|
/>
|
|
</div>
|
|
<div className="flex flex-col h-full w-full vertical-scrollbar scrollbar-lg">
|
|
{DEFAULT_GLOBAL_VIEWS_LIST.filter((v) => v.label.toLowerCase().includes(query.toLowerCase())).map(
|
|
(option) => (
|
|
<GlobalDefaultViewListItem key={option.key} view={option} />
|
|
)
|
|
)}
|
|
<GlobalViewsList searchQuery={query} />
|
|
</div>
|
|
</div>
|
|
</>
|
|
);
|
|
});
|
|
|
|
export default WorkspaceViewsPage;
|