2023-11-02 18:27:44 +00:00
|
|
|
import { ReactElement } from "react";
|
2024-02-20 08:06:38 +00:00
|
|
|
import { observer } from "mobx-react";
|
2022-12-20 10:35:21 +00:00
|
|
|
// layouts
|
|
|
|
// components
|
2024-03-19 14:38:35 +00:00
|
|
|
import { PageHead } from "@/components/core";
|
|
|
|
import { ProjectSettingHeader } from "@/components/headers";
|
|
|
|
import { ProjectMemberList, ProjectSettingsMemberDefaults } from "@/components/project";
|
2023-02-08 04:43:07 +00:00
|
|
|
// types
|
2024-02-20 08:06:38 +00:00
|
|
|
// hooks
|
2024-03-19 14:38:35 +00:00
|
|
|
import { useProject } from "@/hooks/store";
|
|
|
|
import { AppLayout } from "@/layouts/app-layout";
|
|
|
|
import { ProjectSettingLayout } from "@/layouts/settings-layout";
|
|
|
|
import { NextPageWithLayout } from "@/lib/types";
|
2022-12-20 10:35:21 +00:00
|
|
|
|
2024-02-20 08:06:38 +00:00
|
|
|
const MembersSettingsPage: NextPageWithLayout = observer(() => {
|
|
|
|
// store
|
|
|
|
const { currentProjectDetails } = useProject();
|
|
|
|
// derived values
|
|
|
|
const pageTitle = currentProjectDetails?.name ? `${currentProjectDetails?.name} - Members` : undefined;
|
|
|
|
|
|
|
|
return (
|
|
|
|
<>
|
|
|
|
<PageHead title={pageTitle} />
|
|
|
|
<section className={`w-full overflow-y-auto py-8 pr-9`}>
|
|
|
|
<ProjectSettingsMemberDefaults />
|
|
|
|
<ProjectMemberList />
|
|
|
|
</section>
|
|
|
|
</>
|
|
|
|
);
|
|
|
|
});
|
2022-12-20 10:35:21 +00:00
|
|
|
|
2023-11-02 18:27:44 +00:00
|
|
|
MembersSettingsPage.getLayout = function getLayout(page: ReactElement) {
|
|
|
|
return (
|
2024-05-24 08:50:56 +00:00
|
|
|
<AppLayout header={<ProjectSettingHeader />} withProjectWrapper>
|
2023-11-02 18:27:44 +00:00
|
|
|
<ProjectSettingLayout>{page}</ProjectSettingLayout>
|
|
|
|
</AppLayout>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export default MembersSettingsPage;
|