From 7b76df68680f08eb416c93f24ba9ac2d7b7a1eee Mon Sep 17 00:00:00 2001 From: Anmol Singh Bhatia <121005188+anmolsinghbhatia@users.noreply.github.com> Date: Wed, 6 Mar 2024 14:26:34 +0530 Subject: [PATCH] [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 --- .../projects/[projectId]/settings/states.tsx | 29 ++++++++++++++----- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/web/pages/[workspaceSlug]/projects/[projectId]/settings/states.tsx b/web/pages/[workspaceSlug]/projects/[projectId]/settings/states.tsx index 3fa9561a8..57451e699 100644 --- a/web/pages/[workspaceSlug]/projects/[projectId]/settings/states.tsx +++ b/web/pages/[workspaceSlug]/projects/[projectId]/settings/states.tsx @@ -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 = () => ( -
-
-

States

-
- -
-); +const StatesSettingsPage: NextPageWithLayout = observer(() => { + // store + const { currentProjectDetails } = useProject(); + // derived values + const pageTitle = currentProjectDetails?.name ? `${currentProjectDetails?.name} - States` : undefined; + return ( + <> + +
+
+

States

+
+ +
+ + ); +}); StatesSettingsPage.getLayout = function getLayout(page: ReactElement) { return (