[Embeds] Add ref_url (#3533)
* get outer location and pass in to the iframe * enable post.html in dev * only add ref_url if starts with http * Revert "enable post.html in dev" This reverts commit 6f224c6e2c4a016f7ea17ff998c4b4e56b9a4f9b. --------- Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
This commit is contained in:
parent
4c95ec2ec4
commit
1a9eeb760f
2 changed files with 17 additions and 1 deletions
|
@ -8,8 +8,14 @@ export function Link({
|
|||
href: string
|
||||
className?: string
|
||||
} & h.JSX.HTMLAttributes<HTMLAnchorElement>) {
|
||||
const searchParam = new URLSearchParams(window.location.search)
|
||||
const ref_url = searchParam.get('ref_url')
|
||||
|
||||
const newSearchParam = new URLSearchParams()
|
||||
newSearchParam.set('ref_src', 'embed')
|
||||
if (ref_url) {
|
||||
newSearchParam.set('ref_url', ref_url)
|
||||
}
|
||||
|
||||
return (
|
||||
<a
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue