diff --git a/functions/src/emails.ts b/functions/src/emails.ts index 8aba4fb5..b5838968 100644 --- a/functions/src/emails.ts +++ b/functions/src/emails.ts @@ -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` diff --git a/web/components/feed/copy-link-date-time.tsx b/web/components/feed/copy-link-date-time.tsx index 3bd6d21a..354996a4 100644 --- a/web/components/feed/copy-link-date-time.tsx +++ b/web/components/feed/copy-link-date-time.tsx @@ -21,14 +21,11 @@ export function CopyLinkDateTimeComponent(props: { event: React.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) } diff --git a/web/components/feed/feed-comments.tsx b/web/components/feed/feed-comments.tsx index 55bfe0f6..db55e890 100644 --- a/web/components/feed/feed-comments.tsx +++ b/web/components/feed/feed-comments.tsx @@ -156,7 +156,7 @@ export function FeedComment(props: {