[WEB-581] chore: project states setting page improvement (#3864)

* chore: project states setting page improvement

* chore: code refactor

* chore: observer added in project state setting page
This commit is contained in:
Anmol Singh Bhatia 2024-03-06 14:26:34 +05:30 committed by GitHub
parent dbdd14493b
commit 7b76df6868
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,21 +1,34 @@
import { ReactElement } from "react";
import { observer } from "mobx-react";
// layout
import { AppLayout } from "layouts/app-layout";
import { ProjectSettingLayout } from "layouts/settings-layout";
// components
import { ProjectSettingStateList } from "components/states";
import { ProjectSettingHeader } from "components/headers";
import { PageHead } from "components/core";
// types
import { NextPageWithLayout } from "lib/types";
// hook
import { useProject } from "hooks/store";
const StatesSettingsPage: NextPageWithLayout = () => (
<div className="w-full gap-10 overflow-y-auto py-8 pr-9">
<div className="flex items-center border-b border-custom-border-100 py-3.5">
<h3 className="text-xl font-medium">States</h3>
</div>
<ProjectSettingStateList />
</div>
);
const StatesSettingsPage: NextPageWithLayout = observer(() => {
// store
const { currentProjectDetails } = useProject();
// derived values
const pageTitle = currentProjectDetails?.name ? `${currentProjectDetails?.name} - States` : undefined;
return (
<>
<PageHead title={pageTitle} />
<div className="w-full gap-10 overflow-y-auto py-8 pr-9">
<div className="flex items-center border-b border-custom-border-100 py-3.5">
<h3 className="text-xl font-medium">States</h3>
</div>
<ProjectSettingStateList />
</div>
</>
);
});
StatesSettingsPage.getLayout = function getLayout(page: ReactElement) {
return (