fix: copy link button not working on the peek overview (#2075)

* fix: copy issue link from the peek overview

* refactor: peek overview layout
This commit is contained in:
Aaryan Khandelwal 2023-09-04 14:47:28 +05:30 committed by GitHub
parent 58e23304a7
commit 8f46492c42
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 62 additions and 85 deletions

View file

@ -50,12 +50,9 @@ export const PeekOverviewIssueProperties: React.FC<Props> = ({
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!",