import * as Linking from "expo-linking"; import { getDesktopHost } from "@/desktop/host"; import { isWeb } from "@/constants/platform"; export async function openExternalUrl(url: string): Promise { if (isWeb) { const opener = getDesktopHost()?.opener?.openUrl; if (typeof opener === "function") { await opener(url); return; } window.open(url, "_blank", "noopener,noreferrer"); return; } await Linking.openURL(url); }