about summary refs log tree commit diff
path: root/src/components/dialogs/Embed.tsx
diff options
context:
space:
mode:
authorSamuel Newman <mozzius@protonmail.com>2024-04-13 12:44:37 +0100
committerGitHub <noreply@github.com>2024-04-13 12:44:37 +0100
commit4c95ec2ec403c355dbe118477e48e593b0512101 (patch)
tree978ec1aecab48c4359f7036dba79a0896dd45707 /src/components/dialogs/Embed.tsx
parent9fb20915e890be0993c15ad19b59105b78cf8f12 (diff)
downloadvoidsky-4c95ec2ec403c355dbe118477e48e593b0512101.tar.zst
add ref_src (#3532)
Diffstat (limited to 'src/components/dialogs/Embed.tsx')
-rw-r--r--src/components/dialogs/Embed.tsx8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/components/dialogs/Embed.tsx b/src/components/dialogs/Embed.tsx
index 0478dbae8..7d858cae4 100644
--- a/src/components/dialogs/Embed.tsx
+++ b/src/components/dialogs/Embed.tsx
@@ -58,10 +58,14 @@ function EmbedDialogInner({
   }, [copied])
 
   const snippet = React.useMemo(() => {
+    function toEmbedUrl(href: string) {
+      return toShareUrl(href) + '?ref_src=embed'
+    }
+
     const lang = record.langs && record.langs.length > 0 ? record.langs[0] : ''
-    const profileHref = toShareUrl(['/profile', postAuthor.did].join('/'))
+    const profileHref = toEmbedUrl(['/profile', postAuthor.did].join('/'))
     const urip = new AtUri(postUri)
-    const href = toShareUrl(
+    const href = toEmbedUrl(
       ['/profile', postAuthor.did, 'post', urip.rkey].join('/'),
     )