diff --git a/package.json b/package.json index 12df5ee..6c16307 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@neynar/create-farcaster-mini-app", - "version": "1.8.3", + "version": "1.8.4", "type": "module", "private": false, "access": "public", diff --git a/src/app/providers.NeynarAuth.tsx b/src/app/providers.NeynarAuth.tsx index e8bd047..1b24108 100644 --- a/src/app/providers.NeynarAuth.tsx +++ b/src/app/providers.NeynarAuth.tsx @@ -6,7 +6,7 @@ import { SessionProvider } from 'next-auth/react'; import { AuthKitProvider } from '@farcaster/auth-kit'; import { MiniAppProvider } from '@neynar/react'; import { SafeFarcasterSolanaProvider } from '~/components/providers/SafeFarcasterSolanaProvider'; -import { ANALYTICS_ENABLED } from '~/lib/constants'; +import { ANALYTICS_ENABLED, RETURN_URL } from '~/lib/constants'; const WagmiProvider = dynamic( () => import('~/components/providers/WagmiProvider'), @@ -30,6 +30,7 @@ export function Providers({ diff --git a/src/app/providers.tsx b/src/app/providers.tsx index b5884a5..3510835 100644 --- a/src/app/providers.tsx +++ b/src/app/providers.tsx @@ -3,7 +3,7 @@ import dynamic from 'next/dynamic'; import { MiniAppProvider } from '@neynar/react'; import { SafeFarcasterSolanaProvider } from '~/components/providers/SafeFarcasterSolanaProvider'; -import { ANALYTICS_ENABLED } from '~/lib/constants'; +import { ANALYTICS_ENABLED, RETURN_URL } from '~/lib/constants'; const WagmiProvider = dynamic( () => import('~/components/providers/WagmiProvider'), @@ -24,6 +24,7 @@ export function Providers({ {children} diff --git a/src/lib/constants.ts b/src/lib/constants.ts index d81c8a6..109a3c2 100644 --- a/src/lib/constants.ts +++ b/src/lib/constants.ts @@ -125,6 +125,14 @@ export const ANALYTICS_ENABLED: boolean = true; */ export const APP_REQUIRED_CHAINS: string[] = []; +/** + * Return URL for the mini app. + * + * If provided, the mini app will be rendered with a return URL to be rendered if the + * back button is pressed from the home page. + */ +export const RETURN_URL: string | null = null; + // PLEASE DO NOT UPDATE THIS export const SIGNED_KEY_REQUEST_VALIDATOR_EIP_712_DOMAIN = { name: 'Farcaster SignedKeyRequestValidator',