import React, { ReactElement } from "react"; import { useRouter } from "next/router"; import { observer } from "mobx-react-lite"; // hooks import { useProject, useUser } from "hooks/store"; // layouts import { AppLayout } from "layouts/app-layout"; import { ProjectSettingLayout } from "layouts/settings-layout"; // hooks import useToast from "hooks/use-toast"; // components import { AutoArchiveAutomation, AutoCloseAutomation } from "components/automation"; import { ProjectSettingHeader } from "components/headers"; // types import { NextPageWithLayout } from "lib/types"; import { IProject } from "@plane/types"; // constants import { EUserProjectRoles } from "constants/project"; const AutomationSettingsPage: NextPageWithLayout = observer(() => { // router const router = useRouter(); const { workspaceSlug, projectId } = router.query; // toast alert const { setToastAlert } = useToast(); // store hooks const { membership: { currentProjectRole }, } = useUser(); const { currentProjectDetails: projectDetails, updateProject } = useProject(); const handleChange = async (formData: Partial) => { if (!workspaceSlug || !projectId || !projectDetails) return; await updateProject(workspaceSlug.toString(), projectId.toString(), formData).catch(() => { setToastAlert({ type: "error", title: "Error!", message: "Something went wrong. Please try again.", }); }); }; const isAdmin = currentProjectRole === EUserProjectRoles.ADMIN; return (

Automations

); }); AutomationSettingsPage.getLayout = function getLayout(page: ReactElement) { return ( } withProjectWrapper> {page} ); }; export default AutomationSettingsPage;