diff --git a/web/src/app/(app)/pricing/components/gpuPricingTable.tsx b/web/src/app/(app)/pricing/components/gpuPricingTable.tsx new file mode 100644 index 0000000..a4c4c63 --- /dev/null +++ b/web/src/app/(app)/pricing/components/gpuPricingTable.tsx @@ -0,0 +1,81 @@ +const people = [ + { + name: "Nvidia T4 GPU", + gpu: "1x", + ram: "16GB", + price: "$0.000225/sec", + }, + { + name: "Nvidia A40 GPU", + gpu: "1x", + ram: "48GB", + price: "$0.000575/sec", + }, +]; + +export function GpuPricingPlan() { + return ( +
+
+ + + + + + + + + + + {people.map((person) => ( + + + + + + + ))} + +
+ GPU + + No. + + RAM + + Price +
+ {person.name} +
+
No.
+
+ {person.gpu} +
+
RAM
+
+ {person.ram} +
+
+
+ {person.gpu} + + {person.ram} + + {person.price} +
+
+
+ ); +} diff --git a/web/src/app/(app)/pricing/components/pricingPlanTable.tsx b/web/src/app/(app)/pricing/components/pricingPlanTable.tsx new file mode 100644 index 0000000..ca49212 --- /dev/null +++ b/web/src/app/(app)/pricing/components/pricingPlanTable.tsx @@ -0,0 +1,191 @@ +import { cn } from "@/lib/utils"; +import { RadioGroup } from "@headlessui/react"; +import { useState } from "react"; + +// Define a type for the frequency options +type FrequencyOption = { + value: keyof TierPrice; // Use 'keyof TierPrice' instead of string + label: string; + priceSuffix: string; +}; + +// Define a type for the tier prices +type TierPrice = { + monthly: string; + annually: string; +}; + +// Define a type for the tier options +type TierOption = { + name: string; + id: string; + href: string; + price: TierPrice; + description: string; + features: string[]; + mostPopular: boolean; +}; + +// Define an interface for the pricing structure +interface Pricing { + frequencies: FrequencyOption[]; + tiers: TierOption[]; +} + +const checkMarkIcon = ( + +); + +const pricing: Pricing = { + frequencies: [ + { value: "monthly", label: "Monthly", priceSuffix: "/month" }, + { value: "annually", label: "Annually", priceSuffix: "/year" }, + ], + tiers: [ + { + name: "Hobby", + id: "tier-hobby", + href: "#", + price: { monthly: "$15", annually: "$144" }, + description: "The essentials to provide your best work for clients.", + features: ["5 products", "Up to 1,000 subscribers", "Basic analytics"], + mostPopular: false, + }, + { + name: "Startup", + id: "tier-startup", + href: "#", + price: { monthly: "$60", annually: "$576" }, + description: "A plan that scales with your rapidly growing business.", + features: [ + "25 products", + "Up to 10,000 subscribers", + "Advanced analytics", + "24-hour support response time", + "Marketing automations", + ], + mostPopular: true, + }, + ], +}; + +export function PricingPlan() { + const [frequency, setFrequency] = useState( + pricing.frequencies[0] + ); + + return ( +
+
+
+

+ Pricing +

+

+ Pricing plans for teams of all sizes +

+
+

+ Choose an affordable plan that’s packed with the best features for + engaging your audience, creating customer loyalty, and driving sales. +

+
+ + + Payment frequency + + {pricing.frequencies.map((option) => ( + { + return cn( + checked ? "bg-indigo-600 text-white" : "text-gray-500", + "cursor-pointer rounded-full px-2.5 py-1" + ); + }} + > + {option.label} + + ))} + +
+
+ {pricing.tiers.map((tier) => ( +
+

+ {tier.name} +

+

+ {tier.description} +

+

+ + {tier.price[frequency.value]} + + + {frequency.priceSuffix} + +

+ + Buy plan + +
    + {tier.features.map((feature) => ( +
  • +
    + {checkMarkIcon} +
    + {feature} +
  • + ))} +
+
+ ))} +
+
+
+ ); +} diff --git a/web/src/app/(app)/pricing/loading.tsx b/web/src/app/(app)/pricing/loading.tsx new file mode 100644 index 0000000..9ff4783 --- /dev/null +++ b/web/src/app/(app)/pricing/loading.tsx @@ -0,0 +1,9 @@ +"use client"; + +import { LoadingPageWrapper } from "@/components/LoadingWrapper"; +import { usePathname } from "next/navigation"; + +export default function Loading() { + const pathName = usePathname(); + return ; +} diff --git a/web/src/app/(app)/pricing/page.tsx b/web/src/app/(app)/pricing/page.tsx new file mode 100644 index 0000000..3d237bd --- /dev/null +++ b/web/src/app/(app)/pricing/page.tsx @@ -0,0 +1,13 @@ +"use client"; + +import { GpuPricingPlan } from "@/app/(app)/pricing/components/gpuPricingTable"; +import { PricingPlan } from "@/app/(app)/pricing/components/pricingPlanTable"; + +export default function Home() { + return ( +
+ + +
+ ); +}