fix: create custom pricing table

This commit is contained in:
Mythie
2023-10-13 23:33:40 +11:00
parent 6d7fc32075
commit 17b43caa5c
10 changed files with 287 additions and 42 deletions

View File

@ -1,3 +1,4 @@
/// <reference types="./stripe.d.ts" />
import Stripe from 'stripe';
export const stripe = new Stripe(process.env.NEXT_PRIVATE_STRIPE_API_KEY ?? '', {

View File

@ -0,0 +1,7 @@
declare module 'stripe' {
namespace Stripe {
interface Product {
features?: Array<{ name: string }>;
}
}
}

View File

@ -0,0 +1,3 @@
export const toHumanPrice = (price: number) => {
return Number(price / 100).toFixed(2);
};