diff --git a/front/packages/primitives/src/links.tsx b/front/packages/primitives/src/links.tsx index 10942d2e..4d3d8d12 100644 --- a/front/packages/primitives/src/links.tsx +++ b/front/packages/primitives/src/links.tsx @@ -24,6 +24,7 @@ import { TextLink, useLink } from "solito/link"; import { useTheme, useYoshiki } from "yoshiki/native"; import type { UrlObject } from "url"; import { alpha } from "./themes"; +import { parseNextPath } from "solito/router"; export const A = ({ href, @@ -114,8 +115,11 @@ export const Link = ({ onPress={(e?: any) => { props?.onPress?.(e); if (e?.defaultPrevented) return; - if (Platform.OS !== "web" && typeof href === "string" && href?.includes("://")) - Linking.openURL(href); + if ( + (Platform.OS !== "web" && typeof href === "string" && href?.includes("://")) || + (typeof href === "object" && href?.pathname?.includes("://")) + ) + Linking.openURL(typeof href === "object" ? parseNextPath(href) : href); else linkProps.onPress(e); }} > diff --git a/front/packages/ui/src/login/oidc.tsx b/front/packages/ui/src/login/oidc.tsx index 43b38772..90eebdbb 100644 --- a/front/packages/ui/src/login/oidc.tsx +++ b/front/packages/ui/src/login/oidc.tsx @@ -50,6 +50,7 @@ export const OidcLogin = ({ apiUrl }: { apiUrl?: string }) => {