Update src/components/Link.tsx
Co-authored-by: Eric Bailey <git@esb.lol>
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user