Fix comment links from /activity & add to emails (#320)
This commit is contained in:
parent
f0d44be2f4
commit
1334840ee0
|
@ -262,7 +262,7 @@ export const sendNewCommentEmail = async (
|
|||
return
|
||||
|
||||
const { question, creatorUsername, slug } = contract
|
||||
const marketUrl = `https://${DOMAIN}/${creatorUsername}/${slug}`
|
||||
const marketUrl = `https://${DOMAIN}/${creatorUsername}/${slug}#${comment.id}`
|
||||
|
||||
const unsubscribeUrl = `https://us-central1-${PROJECT_ID}.cloudfunctions.net/unsubscribe?id=${userId}&type=market-comment`
|
||||
|
||||
|
|
|
@ -21,14 +21,11 @@ export function CopyLinkDateTimeComponent(props: {
|
|||
event: React.MouseEvent<HTMLAnchorElement, MouseEvent>
|
||||
) {
|
||||
event.preventDefault()
|
||||
let elementLocation = `https://${ENV_CONFIG.domain}${contractPath(
|
||||
contract
|
||||
)}#${elementId}`
|
||||
|
||||
let currentLocation = window.location.href.includes('/home')
|
||||
? `https://${ENV_CONFIG.domain}${contractPath(contract)}#${elementId}`
|
||||
: window.location.href
|
||||
if (currentLocation.includes('#')) {
|
||||
currentLocation = currentLocation.split('#')[0]
|
||||
}
|
||||
copyToClipboard(`${currentLocation}#${elementId}`)
|
||||
copyToClipboard(elementLocation)
|
||||
setShowToast(true)
|
||||
setTimeout(() => setShowToast(false), 2000)
|
||||
}
|
||||
|
|
|
@ -156,7 +156,7 @@ export function FeedComment(props: {
|
|||
<Row
|
||||
className={clsx(
|
||||
'flex space-x-1.5 transition-all duration-1000 sm:space-x-3',
|
||||
highlighted ? `-m-2 rounded bg-indigo-500/[0.2] p-2` : ''
|
||||
highlighted ? `-m-1 rounded bg-indigo-500/[0.2] p-2` : ''
|
||||
)}
|
||||
>
|
||||
<Avatar
|
||||
|
|
Loading…
Reference in New Issue
Block a user