|
|
@ -10,9 +10,11 @@ type CopyRoadmapLinkProps = { |
|
|
|
export function CopyRoadmapLink(props: CopyRoadmapLinkProps) { |
|
|
|
export function CopyRoadmapLink(props: CopyRoadmapLinkProps) { |
|
|
|
const { roadmapId, onClose } = props; |
|
|
|
const { roadmapId, onClose } = props; |
|
|
|
|
|
|
|
|
|
|
|
const shareLink = `${ |
|
|
|
const baseUrl = import.meta.env.DEV |
|
|
|
import.meta.env.PUBLIC_ROADMAP_WEB_URL |
|
|
|
? 'http://localhost:3000' |
|
|
|
}/r?id=${roadmapId}`;
|
|
|
|
: 'https://roadmap.sh'; |
|
|
|
|
|
|
|
const shareLink = `${baseUrl}/r?id=${roadmapId}`; |
|
|
|
|
|
|
|
|
|
|
|
const { copyText, isCopied } = useCopyText(); |
|
|
|
const { copyText, isCopied } = useCopyText(); |
|
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
return ( |
|
|
|