Skip to content

Commit

Permalink
Update page.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
ArhanAnsari authored Sep 30, 2024
1 parent c1a74c9 commit 3330997
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/plans/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import getStripe from "@/lib/stripe-js";
import React from "react";
import SEO from "@/components/SEO"; // Import the SEO component

// Define the type for userPlan prop
// Define the type for userPlan prop and make it optional
interface PlansPageProps {
userPlan: string;
userPlan?: string; // Mark it as optional
}

export default function PlansPage({ userPlan }: PlansPageProps) { // Accept userPlan as prop
export default function PlansPage({ userPlan = "free" }: PlansPageProps) { // Default to "free" if not provided
const getPriceFn = (plan: string) => {
fetch("/api/checkout?plan=" + plan)
.then((data) => data.json())
Expand Down

0 comments on commit 3330997

Please sign in to comment.