From cb99446f4c3a764e31e7a59c8945de0b3c7ff9f4 Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Fri, 15 Sep 2023 10:46:50 +0200 Subject: [PATCH] update share board link --- src/utils/handleShareClick.js | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/utils/handleShareClick.js b/src/utils/handleShareClick.js index 19ab126c..0e7b59c3 100644 --- a/src/utils/handleShareClick.js +++ b/src/utils/handleShareClick.js @@ -1,14 +1,19 @@ function handleShareClick(selectedAddress, cid) { - const plebBzBaseURL = "https://pleb.bz/p/"; + let shareLink; - let shareLink = `${plebBzBaseURL}${selectedAddress}/`; + if (cid === "rules" || cid === "description") { + shareLink = `https://plebchan.eth.limo/#/p/${selectedAddress}`; + } else { + const plebBzBaseURL = "https://pleb.bz/p/"; + shareLink = `${plebBzBaseURL}${selectedAddress}/`; + + if (cid !== "rules" && cid !== "description") { + shareLink += `c/${cid}`; + } - if (cid !== "rules" && cid !== "description") { - shareLink += `c/${cid}`; + shareLink += `?redirect=plebchan.eth.limo`; } - shareLink += `?redirect=plebchan.eth.limo`; - if (navigator.clipboard) { navigator.clipboard.writeText(shareLink).then(() => { console.log("Link copied to clipboard!");