diff --git a/front/packages/primitives/src/links.tsx b/front/packages/primitives/src/links.tsx index 4d3d8d12..b866fb53 100644 --- a/front/packages/primitives/src/links.tsx +++ b/front/packages/primitives/src/links.tsx @@ -95,12 +95,13 @@ export const PressableFeedback = forwardRef(function Feedb }); export const Link = ({ - href, + href: link, replace, target, children, ...props }: { href?: string | UrlObject | null; target?: string; replace?: boolean } & PressableProps) => { + const href = link && typeof link === "object" ? parseNextPath(link) : link; const linkProps = useLink({ href: href ?? "#", replace, @@ -115,11 +116,7 @@ export const Link = ({ onPress={(e?: any) => { props?.onPress?.(e); if (e?.defaultPrevented) return; - if ( - (Platform.OS !== "web" && typeof href === "string" && href?.includes("://")) || - (typeof href === "object" && href?.pathname?.includes("://")) - ) - Linking.openURL(typeof href === "object" ? parseNextPath(href) : href); + if (Platform.OS !== "web" && href?.includes("://")) Linking.openURL(href); else linkProps.onPress(e); }} > diff --git a/front/packages/ui/src/login/oidc.tsx b/front/packages/ui/src/login/oidc.tsx index 90eebdbb..43b38772 100644 --- a/front/packages/ui/src/login/oidc.tsx +++ b/front/packages/ui/src/login/oidc.tsx @@ -50,7 +50,6 @@ export const OidcLogin = ({ apiUrl }: { apiUrl?: string }) => {