Fix busted comment permalink copying code (#481)
* Fix busted comment permalink copying code * Fix busted comment permalink href
This commit is contained in:
parent
f1c3914807
commit
9cccc08021
|
@ -28,8 +28,7 @@ export function CopyLinkDateTimeComponent(props: {
|
||||||
event: React.MouseEvent<HTMLAnchorElement, MouseEvent>
|
event: React.MouseEvent<HTMLAnchorElement, MouseEvent>
|
||||||
) {
|
) {
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
const elementLocation = `https://${ENV_CONFIG.domain}/${contractCreatorUsername}/${contractSlug}
|
const elementLocation = `https://${ENV_CONFIG.domain}/${contractCreatorUsername}/${contractSlug}#${elementId}`
|
||||||
)}#${elementId}`
|
|
||||||
|
|
||||||
copyToClipboard(elementLocation)
|
copyToClipboard(elementLocation)
|
||||||
setShowToast(true)
|
setShowToast(true)
|
||||||
|
@ -39,7 +38,7 @@ export function CopyLinkDateTimeComponent(props: {
|
||||||
<div className={clsx('inline', className)}>
|
<div className={clsx('inline', className)}>
|
||||||
<DateTimeTooltip time={createdTime}>
|
<DateTimeTooltip time={createdTime}>
|
||||||
<Link
|
<Link
|
||||||
href={`/${contractCreatorUsername}/${contractCreatorUsername}#${elementId}`}
|
href={`/${contractCreatorUsername}/${contractSlug}#${elementId}`}
|
||||||
passHref={true}
|
passHref={true}
|
||||||
>
|
>
|
||||||
<a
|
<a
|
||||||
|
|
Loading…
Reference in New Issue
Block a user