Update src/components/Link.tsx

Co-authored-by: Eric Bailey <git@esb.lol>
This commit is contained in:
Samuel Newman
2025-06-09 09:50:44 -07:00
committed by GitHub
parent b507b22d9e
commit 13ec071aab
+4 -2
View File
@@ -99,9 +99,11 @@ export function useLink({
const href = useMemo(() => { const href = useMemo(() => {
return typeof to === 'string' return typeof to === 'string'
? convertBskyAppUrlIfNeeded(sanitizeUrl(to)) ? convertBskyAppUrlIfNeeded(sanitizeUrl(to))
: !to.screen : to.screen
? buildHref(to.screen, to.params)
: to.href
? convertBskyAppUrlIfNeeded(sanitizeUrl(to.href)) ? convertBskyAppUrlIfNeeded(sanitizeUrl(to.href))
: buildHref(to.screen, to.params) : undefined
}, [to, buildHref]) }, [to, buildHref])
if (!href) { if (!href) {