plane/web/components/pages/list/root.tsx
Anmol Singh Bhatia 87a606446f
[WEB-1093] chore: padding and borders consistency (#4315)
* chore: global list layout and list item component added

* chore: project view list layout consistency

* chore: project view sub header consistency

* chore: pages list layout consistency

* chore: project view sub header improvement

* chore: list layout item component improvement

* chore: module list layout consistency

* chore: cycle list layout consistency

* chore: issue list layout consistency

* chore: header height consistency

* chore: sub header consistency

* chore: list layout improvement

* chore: inbox sidebar improvement

* fix: cycle quick action

* chore: inbox selected issue improvement

* chore: label option removed from pages filter

* chore: inbox create issue modal improvement
2024-04-30 17:21:24 +05:30

34 lines
972 B
TypeScript

import { FC } from "react";
import { observer } from "mobx-react";
// types
import { TPageNavigationTabs } from "@plane/types";
// components
import { ListLayout } from "@/components/core/list";
// hooks
import { useProjectPages } from "@/hooks/store";
// components
import { PageListBlock } from "./";
type TPagesListRoot = {
pageType: TPageNavigationTabs;
projectId: string;
workspaceSlug: string;
};
export const PagesListRoot: FC<TPagesListRoot> = observer((props) => {
const { pageType, projectId, workspaceSlug } = props;
// store hooks
const { getCurrentProjectFilteredPageIds } = useProjectPages(projectId);
// derived values
const filteredPageIds = getCurrentProjectFilteredPageIds(pageType);
if (!filteredPageIds) return <></>;
return (
<ListLayout>
{filteredPageIds.map((pageId) => (
<PageListBlock key={pageId} workspaceSlug={workspaceSlug} projectId={projectId} pageId={pageId} />
))}
</ListLayout>
);
});