add ref_src (#3532)

This commit is contained in:
Samuel Newman 2024-04-13 12:44:37 +01:00 committed by GitHub
parent 9fb20915e8
commit 4c95ec2ec4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 13 additions and 4 deletions

View file

@ -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('/'),
)