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";
|
} from "@/constants/issue";
|
||||||
import { EUserProjectRoles } from "@/constants/project";
|
import { EUserProjectRoles } from "@/constants/project";
|
||||||
// helpers
|
// 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";
|
import { calculateTotalFilters } from "@/helpers/filter.helper";
|
||||||
// hooks
|
// hooks
|
||||||
import {
|
import {
|
||||||
|
|
@ -107,8 +107,8 @@ export const ProjectIssuesHeader = observer(() => {
|
||||||
},
|
},
|
||||||
[workspaceSlug, projectId, updateFilters]
|
[workspaceSlug, projectId, updateFilters]
|
||||||
);
|
);
|
||||||
|
const SPACE_APP_URL = (SPACE_BASE_URL.trim() === "" ? window.location.origin : SPACE_BASE_URL) + SPACE_BASE_PATH;
|
||||||
const publishedURL = `${SPACE_BASE_URL}/issues/${currentProjectDetails?.anchor}`;
|
const publishedURL = `${SPACE_APP_URL}/issues/${currentProjectDetails?.anchor}`;
|
||||||
|
|
||||||
const canUserCreateIssue =
|
const canUserCreateIssue =
|
||||||
currentProjectRole && [EUserProjectRoles.ADMIN, EUserProjectRoles.MEMBER].includes(currentProjectRole);
|
currentProjectRole && [EUserProjectRoles.ADMIN, EUserProjectRoles.MEMBER].includes(currentProjectRole);
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ import { IProject, TProjectPublishLayouts, TProjectPublishSettings } from "@plan
|
||||||
// ui
|
// ui
|
||||||
import { Button, Loader, ToggleSwitch, TOAST_TYPE, setToast, CustomSelect, ModalCore, EModalWidth } from "@plane/ui";
|
import { Button, Loader, ToggleSwitch, TOAST_TYPE, setToast, CustomSelect, ModalCore, EModalWidth } from "@plane/ui";
|
||||||
// helpers
|
// 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";
|
import { copyTextToClipboard } from "@/helpers/string.helper";
|
||||||
// hooks
|
// hooks
|
||||||
import { useProjectPublish } from "@/hooks/store";
|
import { useProjectPublish } from "@/hooks/store";
|
||||||
|
|
@ -156,7 +156,8 @@ export const PublishProjectModal: React.FC<Props> = observer((props) => {
|
||||||
});
|
});
|
||||||
}, [projectPublishSettings, reset]);
|
}, [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 = () =>
|
const handleCopyLink = () =>
|
||||||
copyTextToClipboard(publishLink).then(() =>
|
copyTextToClipboard(publishLink).then(() =>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue