fix: project publish redirection (#5004)
This commit is contained in:
parent
cc479f39a7
commit
86464c1d6f
2 changed files with 6 additions and 5 deletions
|
|
@ -22,7 +22,7 @@ import {
|
|||
} from "@/constants/issue";
|
||||
import { EUserProjectRoles } from "@/constants/project";
|
||||
// helpers
|
||||
import { SPACE_BASE_URL } from "@/helpers/common.helper";
|
||||
import { SPACE_BASE_PATH, SPACE_BASE_URL } from "@/helpers/common.helper";
|
||||
import { calculateTotalFilters } from "@/helpers/filter.helper";
|
||||
// hooks
|
||||
import {
|
||||
|
|
@ -107,8 +107,8 @@ export const ProjectIssuesHeader = observer(() => {
|
|||
},
|
||||
[workspaceSlug, projectId, updateFilters]
|
||||
);
|
||||
|
||||
const publishedURL = `${SPACE_BASE_URL}/issues/${currentProjectDetails?.anchor}`;
|
||||
const SPACE_APP_URL = (SPACE_BASE_URL.trim() === "" ? window.location.origin : SPACE_BASE_URL) + SPACE_BASE_PATH;
|
||||
const publishedURL = `${SPACE_APP_URL}/issues/${currentProjectDetails?.anchor}`;
|
||||
|
||||
const canUserCreateIssue =
|
||||
currentProjectRole && [EUserProjectRoles.ADMIN, EUserProjectRoles.MEMBER].includes(currentProjectRole);
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import { IProject, TProjectPublishLayouts, TProjectPublishSettings } from "@plan
|
|||
// ui
|
||||
import { Button, Loader, ToggleSwitch, TOAST_TYPE, setToast, CustomSelect, ModalCore, EModalWidth } from "@plane/ui";
|
||||
// helpers
|
||||
import { SPACE_BASE_URL } from "@/helpers/common.helper";
|
||||
import { SPACE_BASE_PATH, SPACE_BASE_URL } from "@/helpers/common.helper";
|
||||
import { copyTextToClipboard } from "@/helpers/string.helper";
|
||||
// hooks
|
||||
import { useProjectPublish } from "@/hooks/store";
|
||||
|
|
@ -156,7 +156,8 @@ export const PublishProjectModal: React.FC<Props> = observer((props) => {
|
|||
});
|
||||
}, [projectPublishSettings, reset]);
|
||||
|
||||
const publishLink = `${SPACE_BASE_URL}/issues/${projectPublishSettings?.anchor}`;
|
||||
const SPACE_APP_URL = (SPACE_BASE_URL.trim() === "" ? window.location.origin : SPACE_BASE_URL) + SPACE_BASE_PATH;
|
||||
const publishLink = `${SPACE_APP_URL}/issues/${projectPublishSettings?.anchor}`;
|
||||
|
||||
const handleCopyLink = () =>
|
||||
copyTextToClipboard(publishLink).then(() =>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue