mirror of
https://github.com/Sosokker/B2D-Ventures.git
synced 2025-12-19 05:54:06 +01:00
11 lines
288 B
TypeScript
11 lines
288 B
TypeScript
import { Stripe, loadStripe } from '@stripe/stripe-js';
|
|
|
|
let stripePromise: Promise<Stripe | null>;
|
|
const getStripe = () => {
|
|
if (!stripePromise) {
|
|
stripePromise = loadStripe(process.env.NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY!);
|
|
}
|
|
return stripePromise;
|
|
};
|
|
|
|
export default getStripe; |