If you want to open external links from within the iFrame, you can use the openExternalLinks function. This will close your app and move to a new website.
This function requires the iFrame SDK to be initialized. See iFrame
Overview for more information.
Copy
Ask AI
"use client";import { useIframeSdk } from "@whop/react";export default function Home() { const iframeSdk = useIframeSdk(); function openLink() { iframeSdk.openExternalUrl({ url: "https://google.com" }); } return <button onClick={openLink}>Click me to open Google</button>;}