chore: merge helpers and layouts (#8624)

* fix: remove constants and services

* fix: formatting

* chore: merge helpers and layouts

* fix: workspace disbale flag handling
This commit is contained in:
sriram veeraghanta 2026-02-10 22:04:07 +05:30 committed by GitHub
parent 7793febcf8
commit 2b6e24d526
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
30 changed files with 37 additions and 414 deletions

View file

@ -18,17 +18,17 @@ import WorkspaceCreationDisabled from "@/app/assets/workspace/workspace-creation
import { CreateWorkspaceForm } from "@/components/workspace/create-workspace-form";
// hooks
import { useUser, useUserProfile } from "@/hooks/store/user";
import { useInstance } from "@/hooks/store/use-instance";
import { useAppRouter } from "@/hooks/use-app-router";
// wrappers
import { AuthenticationWrapper } from "@/lib/wrappers/authentication-wrapper";
// plane web helpers
import { getIsWorkspaceCreationDisabled } from "@/plane-web/helpers/instance.helper";
const CreateWorkspacePage = observer(function CreateWorkspacePage() {
const { t } = useTranslation();
// router
const router = useAppRouter();
// store hooks
const { config } = useInstance();
const { data: currentUser } = useUser();
const { updateUserProfile } = useUserProfile();
// states
@ -38,7 +38,7 @@ const CreateWorkspacePage = observer(function CreateWorkspacePage() {
organization_size: "",
});
// derived values
const isWorkspaceCreationDisabled = getIsWorkspaceCreationDisabled();
const isWorkspaceCreationDisabled = config?.is_workspace_creation_disabled ?? false;
// methods
const getMailtoHref = () => {