plane/web/components/pages/pages-list/archived-pages-list.tsx
sriram veeraghanta 3d09a69d58
fix: eslint issues and reconfiguring (#3891)
* fix: eslint fixes

---------

Co-authored-by: gurusainath <gurusainath007@gmail.com>
2024-03-06 18:39:14 +05:30

32 lines
877 B
TypeScript

import { FC } from "react";
import { observer } from "mobx-react-lite";
// components
import { Loader, Spinner } from "@plane/ui";
import { PagesListView } from "components/pages/pages-list";
// hooks
// ui
import { useProjectPages } from "hooks/store/use-project-specific-pages";
export const ArchivedPagesList: FC = observer(() => {
const projectPageStore = useProjectPages();
const { archivedPageIds, archivedPageLoader } = projectPageStore;
if (archivedPageLoader) {
return (
<div className="flex items-center justify-center h-full w-full">
<Spinner />
</div>
);
}
if (!archivedPageIds)
return (
<Loader className="space-y-4">
<Loader.Item height="40px" />
<Loader.Item height="40px" />
<Loader.Item height="40px" />
</Loader>
);
return <PagesListView pageIds={archivedPageIds} />;
});