2024-01-24 14:07:49 +00:00
|
|
|
import { ReactElement } from "react";
|
2024-02-20 08:06:38 +00:00
|
|
|
import { observer } from "mobx-react";
|
2024-01-24 14:07:49 +00:00
|
|
|
// components
|
2024-02-20 08:06:38 +00:00
|
|
|
import { PageHead } from "components/core";
|
2024-01-24 14:07:49 +00:00
|
|
|
import { WorkspaceActiveCycleHeader } from "components/headers";
|
|
|
|
import { WorkspaceActiveCyclesUpgrade } from "components/workspace";
|
|
|
|
// layouts
|
2024-03-06 13:09:14 +00:00
|
|
|
import { useWorkspace } from "hooks/store";
|
2024-01-24 14:07:49 +00:00
|
|
|
import { AppLayout } from "layouts/app-layout";
|
|
|
|
// types
|
|
|
|
import { NextPageWithLayout } from "lib/types";
|
2024-02-20 08:06:38 +00:00
|
|
|
// hooks
|
2024-01-24 14:07:49 +00:00
|
|
|
|
2024-02-20 08:06:38 +00:00
|
|
|
const WorkspaceActiveCyclesPage: NextPageWithLayout = observer(() => {
|
|
|
|
const { currentWorkspace } = useWorkspace();
|
|
|
|
// derived values
|
|
|
|
const pageTitle = currentWorkspace?.name ? `${currentWorkspace?.name} - Active Cycles` : undefined;
|
|
|
|
|
|
|
|
return (
|
|
|
|
<>
|
|
|
|
<PageHead title={pageTitle} />
|
|
|
|
<WorkspaceActiveCyclesUpgrade />
|
|
|
|
</>
|
|
|
|
);
|
|
|
|
});
|
2024-01-24 14:07:49 +00:00
|
|
|
|
|
|
|
WorkspaceActiveCyclesPage.getLayout = function getLayout(page: ReactElement) {
|
|
|
|
return <AppLayout header={<WorkspaceActiveCycleHeader />}>{page}</AppLayout>;
|
|
|
|
};
|
|
|
|
|
|
|
|
export default WorkspaceActiveCyclesPage;
|