mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
87a606446f
* 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
34 lines
972 B
TypeScript
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>
|
|
);
|
|
});
|