From 243680132e81ed0b722e83d93b2fd8ca4947c444 Mon Sep 17 00:00:00 2001 From: sriram veeraghanta Date: Fri, 10 May 2024 03:46:45 +0530 Subject: [PATCH] fix: space re-directions --- web/components/project/publish-project/modal.tsx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/web/components/project/publish-project/modal.tsx b/web/components/project/publish-project/modal.tsx index 41fd9f368..0b94c56f1 100644 --- a/web/components/project/publish-project/modal.tsx +++ b/web/components/project/publish-project/modal.tsx @@ -9,11 +9,12 @@ import { Dialog, Transition } from "@headlessui/react"; import { IProject } from "@plane/types"; // ui import { Button, Loader, ToggleSwitch, TOAST_TYPE, setToast } from "@plane/ui"; +// helpers +import { SPACE_BASE_PATH, SPACE_BASE_URL } from "@/helpers/common.helper"; // hooks -import { useInstance, useProjectPublish } from "@/hooks/store"; +import { useProjectPublish } from "@/hooks/store"; // store import { IProjectPublishSettings, TProjectPublishViews } from "@/store/project/project-publish.store"; -// types // local components import { CustomPopover } from "./popover"; @@ -55,12 +56,13 @@ const viewOptions: { export const PublishProjectModal: React.FC = observer((props) => { const { isOpen, project, onClose } = props; // hooks - const { instance } = useInstance(); + // const { instance } = useInstance(); // states const [isUnPublishing, setIsUnPublishing] = useState(false); const [isUpdateRequired, setIsUpdateRequired] = useState(false); - const plane_deploy_url = instance?.config?.space_base_url || ""; + // const plane_deploy_url = instance?.config?.space_base_url || ""; + const SPACE_URL = SPACE_BASE_URL + SPACE_BASE_PATH; // router const router = useRouter(); @@ -320,10 +322,10 @@ export const PublishProjectModal: React.FC = observer((props) => { <>
- {`${plane_deploy_url}/${workspaceSlug}/${project.id}`} + {`${SPACE_URL}/${workspaceSlug}/${project.id}`}
- +