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:
parent
58e23304a7
commit
8f46492c42
5 changed files with 62 additions and 85 deletions
|
|
@ -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!",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue