2023-11-28 11:35:42 +00:00
|
|
|
import { observer } from "mobx-react-lite";
|
|
|
|
// mobx store
|
|
|
|
import { useMobxStore } from "lib/mobx/store-provider";
|
2023-10-25 10:18:57 +00:00
|
|
|
// layout
|
|
|
|
import { AppLayout } from "layouts/app-layout";
|
2023-11-01 08:15:04 +00:00
|
|
|
import { WorkspaceSettingLayout } from "layouts/settings-layout";
|
2023-04-08 08:16:46 +00:00
|
|
|
// components
|
2023-10-25 10:18:57 +00:00
|
|
|
import { WorkspaceSettingHeader } from "components/headers";
|
2023-08-14 06:14:17 +00:00
|
|
|
import ExportGuide from "components/exporter/guide";
|
2023-03-23 17:57:11 +00:00
|
|
|
// types
|
2023-11-02 18:27:44 +00:00
|
|
|
import { NextPageWithLayout } from "types/app";
|
2023-11-28 11:35:42 +00:00
|
|
|
// constants
|
|
|
|
import { EUserWorkspaceRoles } from "constants/workspace";
|
2023-07-31 11:52:48 +00:00
|
|
|
|
2023-11-28 11:35:42 +00:00
|
|
|
const ExportsPage: NextPageWithLayout = observer(() => {
|
|
|
|
const {
|
|
|
|
user: { currentWorkspaceRole },
|
|
|
|
} = useMobxStore();
|
|
|
|
|
|
|
|
const hasPageAccess =
|
|
|
|
currentWorkspaceRole && [EUserWorkspaceRoles.ADMIN, EUserWorkspaceRoles.MEMBER].includes(currentWorkspaceRole);
|
|
|
|
|
|
|
|
if (!hasPageAccess)
|
|
|
|
return (
|
|
|
|
<div className="h-full w-full flex justify-center mt-10 p-4">
|
|
|
|
<p className="text-custom-text-300 text-sm">You are not authorized to access this page.</p>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
|
|
|
|
return (
|
|
|
|
<div className="pr-9 py-8 w-full overflow-y-auto">
|
|
|
|
<div className="flex items-center py-3.5 border-b border-custom-border-100">
|
|
|
|
<h3 className="text-xl font-medium">Exports</h3>
|
|
|
|
</div>
|
|
|
|
<ExportGuide />
|
2023-11-13 08:04:05 +00:00
|
|
|
</div>
|
2023-11-28 11:35:42 +00:00
|
|
|
);
|
|
|
|
});
|
2023-03-23 17:57:11 +00:00
|
|
|
|
2023-11-28 11:35:42 +00:00
|
|
|
ExportsPage.getLayout = function getLayout(page: React.ReactElement) {
|
2023-11-02 18:27:44 +00:00
|
|
|
return (
|
|
|
|
<AppLayout header={<WorkspaceSettingHeader title="Export Settings" />}>
|
|
|
|
<WorkspaceSettingLayout>{page}</WorkspaceSettingLayout>
|
|
|
|
</AppLayout>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export default ExportsPage;
|