remove .parse usage (#8016)

* remove .parse usage

* add one more usage

(cherry picked from commit c612fca32a)
This commit is contained in:
Hailey
2025-03-17 15:06:26 -07:00
committed by Eric Bailey
parent dd9e416722
commit 73b538d5b1
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -323,7 +323,7 @@ export function createBskyAppAbsoluteUrl(path: string): string {
export function createProxiedUrl(url: string): string { export function createProxiedUrl(url: string): string {
let u let u
try { try {
u = URL.parse(url) u = new URL(url)
} catch { } catch {
return url return url
} }
+2 -2
View File
@@ -24,13 +24,13 @@ export function Component({href}: {href: string}) {
const onUseIAB = React.useCallback(() => { const onUseIAB = React.useCallback(() => {
setInAppBrowser(true) setInAppBrowser(true)
closeModal() closeModal()
openLink(href, true) openLink(href, true, true)
}, [closeModal, setInAppBrowser, href, openLink]) }, [closeModal, setInAppBrowser, href, openLink])
const onUseLinking = React.useCallback(() => { const onUseLinking = React.useCallback(() => {
setInAppBrowser(false) setInAppBrowser(false)
closeModal() closeModal()
openLink(href, false) openLink(href, false, true)
}, [closeModal, setInAppBrowser, href, openLink]) }, [closeModal, setInAppBrowser, href, openLink])
return ( return (
+1 -1
View File
@@ -39,7 +39,7 @@ export function Component({
if (share) { if (share) {
shareUrl(href) shareUrl(href)
} else { } else {
openLink(href) openLink(href, false, true)
} }
} }