From 3df2e8532b897d666433b16b616877de17b595b1 Mon Sep 17 00:00:00 2001 From: Johan Hammar Date: Sun, 26 Sep 2021 16:31:38 +0200 Subject: [PATCH] =?UTF-8?q?fix(techdocs):=20fix=C2=A0copy=20documentation?= =?UTF-8?q?=20link=20to=20clipboard=20url?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Johan Hammar --- .changeset/healthy-cycles-exercise.md | 5 +++++ plugins/techdocs/src/home/components/actions.tsx | 7 +------ 2 files changed, 6 insertions(+), 6 deletions(-) create mode 100644 .changeset/healthy-cycles-exercise.md diff --git a/.changeset/healthy-cycles-exercise.md b/.changeset/healthy-cycles-exercise.md new file mode 100644 index 0000000000..cd0e73a100 --- /dev/null +++ b/.changeset/healthy-cycles-exercise.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-techdocs': patch +--- + +Fixed the URL for the "Click to copy documentation link to clipboard" action diff --git a/plugins/techdocs/src/home/components/actions.tsx b/plugins/techdocs/src/home/components/actions.tsx index b737e99d14..eb09c1d429 100644 --- a/plugins/techdocs/src/home/components/actions.tsx +++ b/plugins/techdocs/src/home/components/actions.tsx @@ -28,12 +28,7 @@ export function createCopyDocsUrlAction(copyToClipboard: Function) { icon: () => , tooltip: 'Click to copy documentation link to clipboard', onClick: () => - copyToClipboard( - `${window.location.origin}${window.location.pathname.replace( - /\/?$/, - '/', - )}${row.resolved.docsUrl}`, - ), + copyToClipboard(`${window.location.origin}${row.resolved.docsUrl}`), }; }; }