eny.space Landingpage
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at main 15 lines 389 B view raw
1/** 2 * This is a singleton to ensure we only instantiate Stripe once. 3 */ 4import { Stripe, loadStripe } from "@stripe/stripe-js"; 5 6let stripePromise: Promise<Stripe | null>; 7 8export default function getStripe(): Promise<Stripe | null> { 9 if (!stripePromise) 10 stripePromise = loadStripe( 11 process.env.NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY as string, 12 ); 13 14 return stripePromise; 15}