Fix busted comment permalink copying code (#481)

* Fix busted comment permalink copying code

* Fix busted comment permalink href
This commit is contained in:
Marshall Polaris 2022-06-10 14:31:53 -07:00 committed by GitHub
parent f1c3914807
commit 9cccc08021
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -28,8 +28,7 @@ export function CopyLinkDateTimeComponent(props: {
event: React.MouseEvent<HTMLAnchorElement, MouseEvent>
) {
event.preventDefault()
const elementLocation = `https://${ENV_CONFIG.domain}/${contractCreatorUsername}/${contractSlug}
)}#${elementId}`
const elementLocation = `https://${ENV_CONFIG.domain}/${contractCreatorUsername}/${contractSlug}#${elementId}`
copyToClipboard(elementLocation)
setShowToast(true)
@ -39,7 +38,7 @@ export function CopyLinkDateTimeComponent(props: {
<div className={clsx('inline', className)}>
<DateTimeTooltip time={createdTime}>
<Link
href={`/${contractCreatorUsername}/${contractCreatorUsername}#${elementId}`}
href={`/${contractCreatorUsername}/${contractSlug}#${elementId}`}
passHref={true}
>
<a