From ccd72c6e449621ec610618835b10c3f1f317623b Mon Sep 17 00:00:00 2001 From: Arik Chakma Date: Sat, 30 Sep 2023 19:47:20 +0600 Subject: [PATCH] Fix Roadmap Share Link --- src/components/ShareOptions/CopyRoadmapLink.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/ShareOptions/CopyRoadmapLink.tsx b/src/components/ShareOptions/CopyRoadmapLink.tsx index d61b5bb3c..28f9f543b 100644 --- a/src/components/ShareOptions/CopyRoadmapLink.tsx +++ b/src/components/ShareOptions/CopyRoadmapLink.tsx @@ -10,9 +10,11 @@ type CopyRoadmapLinkProps = { export function CopyRoadmapLink(props: CopyRoadmapLinkProps) { const { roadmapId, onClose } = props; - const shareLink = `${ - import.meta.env.PUBLIC_ROADMAP_WEB_URL - }/r?id=${roadmapId}`; + const baseUrl = import.meta.env.DEV + ? 'http://localhost:3000' + : 'https://roadmap.sh'; + const shareLink = `${baseUrl}/r?id=${roadmapId}`; + const { copyText, isCopied } = useCopyText(); return (