diff --git a/space/components/issues/peek-overview/header.tsx b/space/components/issues/peek-overview/header.tsx index 79de3978b..2aa43ff47 100644 --- a/space/components/issues/peek-overview/header.tsx +++ b/space/components/issues/peek-overview/header.tsx @@ -1,7 +1,5 @@ import React from "react"; -import { useRouter } from "next/router"; - // headless ui import { Listbox, Transition } from "@headlessui/react"; // hooks @@ -48,15 +46,12 @@ export const PeekOverviewHeader: React.FC = (props) => { const { issueDetails: issueDetailStore }: RootStore = useMobxStore(); - const router = useRouter(); - const { workspace_slug } = router.query; - const { setToastAlert } = useToast(); const handleCopyLink = () => { - const originURL = typeof window !== "undefined" && window.location.origin ? window.location.origin : ""; + const urlToCopy = window.location.href; - copyTextToClipboard(`${originURL}/${workspace_slug}/projects/${issueDetails?.project}/`).then(() => { + copyTextToClipboard(urlToCopy).then(() => { setToastAlert({ type: "success", title: "Link copied!", diff --git a/space/components/issues/peek-overview/issue-properties.tsx b/space/components/issues/peek-overview/issue-properties.tsx index 2d454852a..6b3394b56 100644 --- a/space/components/issues/peek-overview/issue-properties.tsx +++ b/space/components/issues/peek-overview/issue-properties.tsx @@ -1,21 +1,15 @@ -// headless ui -import { Disclosure } from "@headlessui/react"; -// import { getStateGroupIcon } from "components/icons"; // hooks import useToast from "hooks/use-toast"; // icons import { Icon } from "components/ui"; import { copyTextToClipboard, addSpaceIfCamelCase } from "helpers/string.helper"; +// helpers +import { renderDateFormat } from "constants/helpers"; // types import { IIssue } from "types/issue"; +import { IPeekMode } from "store/issue_details"; // constants import { issueGroupFilter, issuePriorityFilter } from "constants/data"; -import { useEffect } from "react"; -import { renderDateFormat } from "constants/helpers"; -import { IPeekMode } from "store/issue_details"; -import { useRouter } from "next/router"; -import { RootStore } from "store/root"; -import { useMobxStore } from "lib/mobx/store-provider"; type Props = { issueDetails: IIssue; @@ -37,11 +31,6 @@ const validDate = (date: any, state: string): string => { export const PeekOverviewIssueProperties: React.FC = ({ issueDetails, mode }) => { const { setToastAlert } = useToast(); - const { issueDetails: issueDetailStore }: RootStore = useMobxStore(); - - const router = useRouter(); - const { workspaceSlug } = router.query; - const startDate = issueDetails.start_date; const targetDate = issueDetails.target_date; @@ -57,11 +46,9 @@ export const PeekOverviewIssueProperties: React.FC = ({ issueDetails, mod const priority = issueDetails.priority ? issuePriorityFilter(issueDetails.priority) : null; const handleCopyLink = () => { - const originURL = typeof window !== "undefined" && window.location.origin ? window.location.origin : ""; + const urlToCopy = window.location.href; - copyTextToClipboard( - `${originURL}/${workspaceSlug}/projects/${issueDetails.project}/issues/${issueDetails.id}` - ).then(() => { + copyTextToClipboard(urlToCopy).then(() => { setToastAlert({ type: "success", title: "Link copied!", diff --git a/space/components/issues/peek-overview/layout.tsx b/space/components/issues/peek-overview/layout.tsx index 09cfa5b78..a3d7386eb 100644 --- a/space/components/issues/peek-overview/layout.tsx +++ b/space/components/issues/peek-overview/layout.tsx @@ -65,26 +65,24 @@ export const IssuePeekOverview: React.FC = observer((props) => { return ( <> - -
- - - - - -
+ + + + + +
- + = observer((props) => { >
-
- - -
- {issueDetailStore.peekMode === "modal" && ( - - )} - {issueDetailStore.peekMode === "full" && ( - - )} -
-
-
-
+ + +
+ {issueDetailStore.peekMode === "modal" && ( + + )} + {issueDetailStore.peekMode === "full" && ( + + )} +
+
+
diff --git a/space/layouts/project-layout.tsx b/space/layouts/project-layout.tsx index f19ddabd2..1a0b7899e 100644 --- a/space/layouts/project-layout.tsx +++ b/space/layouts/project-layout.tsx @@ -13,18 +13,20 @@ const ProjectLayout = ({ children }: { children: React.ReactNode }) => (
{children}
- + + +
+ Plane logo +
+
+ Powered by Plane Deploy +
+
); diff --git a/web/components/issues/peek-overview/issue-properties.tsx b/web/components/issues/peek-overview/issue-properties.tsx index 1f2d618ac..16728b148 100644 --- a/web/components/issues/peek-overview/issue-properties.tsx +++ b/web/components/issues/peek-overview/issue-properties.tsx @@ -50,12 +50,9 @@ export const PeekOverviewIssueProperties: React.FC = ({ maxDate?.setDate(maxDate.getDate()); const handleCopyLink = () => { - const originURL = - typeof window !== "undefined" && window.location.origin ? window.location.origin : ""; + const urlToCopy = window.location.href; - copyTextToClipboard( - `${originURL}/${workspaceSlug}/projects/${issue.project}/issues/${issue.id}` - ).then(() => { + copyTextToClipboard(urlToCopy).then(() => { setToastAlert({ type: "success", title: "Link copied!",