mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
3d09a69d58
* fix: eslint fixes --------- Co-authored-by: gurusainath <gurusainath007@gmail.com>
41 lines
1.1 KiB
TypeScript
41 lines
1.1 KiB
TypeScript
import { ReactElement } from "react";
|
|
import { observer } from "mobx-react";
|
|
import { useRouter } from "next/router";
|
|
// layouts
|
|
// components
|
|
import { PageHead } from "components/core";
|
|
import { ModulesListHeader } from "components/headers";
|
|
import { ModulesListView } from "components/modules";
|
|
// types
|
|
// hooks
|
|
import { useProject } from "hooks/store";
|
|
import { AppLayout } from "layouts/app-layout";
|
|
import { NextPageWithLayout } from "lib/types";
|
|
|
|
const ProjectModulesPage: NextPageWithLayout = observer(() => {
|
|
const router = useRouter();
|
|
const { projectId } = router.query;
|
|
// store
|
|
const { getProjectById } = useProject();
|
|
// derived values
|
|
const project = projectId ? getProjectById(projectId.toString()) : undefined;
|
|
const pageTitle = project?.name ? `${project?.name} - Modules` : undefined;
|
|
|
|
return (
|
|
<>
|
|
<PageHead title={pageTitle} />
|
|
<ModulesListView />
|
|
</>
|
|
);
|
|
});
|
|
|
|
ProjectModulesPage.getLayout = function getLayout(page: ReactElement) {
|
|
return (
|
|
<AppLayout header={<ModulesListHeader />} withProjectWrapper>
|
|
{page}
|
|
</AppLayout>
|
|
);
|
|
};
|
|
|
|
export default ProjectModulesPage;
|