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:
parent
7793febcf8
commit
2b6e24d526
30 changed files with 37 additions and 414 deletions
|
|
@ -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 = () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue