import { FC } from "react"; import { observer } from "mobx-react-lite"; import Image from "next/image"; // components import { ModuleListItem, ModulePeekOverview } from "@/components/modules"; // ui import { CycleModuleListLayout } from "@/components/ui"; // hooks import { useModule, useModuleFilter } from "@/hooks/store"; // assets import AllFiltersImage from "@/public/empty-state/module/all-filters.svg"; import NameFilterImage from "@/public/empty-state/module/name-filter.svg"; export interface IArchivedModulesView { workspaceSlug: string; projectId: string; } export const ArchivedModulesView: FC = observer((props) => { const { workspaceSlug, projectId } = props; // store hooks const { getFilteredArchivedModuleIds, loader } = useModule(); const { archivedModulesSearchQuery } = useModuleFilter(); // derived values const filteredArchivedModuleIds = getFilteredArchivedModuleIds(projectId); if (loader || !filteredArchivedModuleIds) return ; if (filteredArchivedModuleIds.length === 0) return (
No matching modules
No matching modules

{archivedModulesSearchQuery.trim() === "" ? "Remove the filters to see all modules" : "Remove the search criteria to see all modules"}

); return (
{filteredArchivedModuleIds.map((moduleId) => ( ))}
); });