chore: minor subscription change

This commit is contained in:
Tianzhou Chen
2023-05-21 18:29:22 +08:00
parent 2cb848056f
commit 72be45a21a
2 changed files with 5 additions and 5 deletions

View File

@ -36,15 +36,15 @@ const SettingView = () => {
</div>
)}
{hasFeature("account") && (
{hasFeature("payment") && (
<div className="w-full border border-gray-200 dark:border-zinc-700 p-4 rounded-lg space-y-2">
<AccountView />
<PricingView />
</div>
)}
{hasFeature("payment") && session?.user?.subscription.plan != "PRO" && (
{hasFeature("account") && (
<div className="w-full border border-gray-200 dark:border-zinc-700 p-4 rounded-lg space-y-2">
<PricingView />
<AccountView />
</div>
)}

View File

@ -56,7 +56,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
metadata: {
email: session?.user?.email!,
plan: "PRO",
description: "Pro 1 Year License (Early Bird)",
description: "Pro 1 Year (Early Bird)",
},
},
// Link customer if present otherwise pass email and let Stripe create a new customer.