import { FC } from "react"; import { observer } from "mobx-react-lite"; // hooks import { useViewDetail } from "hooks/store"; // types import { TViewDisplayProperties, TViewTypes } from "@plane/types"; import { TViewOperations } from "../types"; type TViewDisplayPropertySelection = { workspaceSlug: string; projectId: string | undefined; viewId: string; viewType: TViewTypes; viewOperations: TViewOperations; property: keyof TViewDisplayProperties; }; export const ViewDisplayPropertySelection: FC = observer((props) => { const { workspaceSlug, projectId, viewId, viewType, viewOperations, property } = props; // hooks const viewDetailStore = useViewDetail(workspaceSlug, projectId, viewId, viewType); const propertyIsSelected = viewDetailStore?.appliedFilters?.display_properties?.[property]; const handlePropertySelection = () => viewOperations?.setDisplayProperties(property); return (
{["key"].includes(property) ? "ID" : property.replaceAll("_", " ")}
); });