diff --git a/package.json b/package.json index 09041b7db..bbc9acf59 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "next-supabase-saas-kit-turbo", - "version": "3.0.1", + "version": "3.0.2", "private": true, "author": { "name": "MakerKit", diff --git a/packages/billing/gateway/src/components/pricing-table.tsx b/packages/billing/gateway/src/components/pricing-table.tsx index 4f3cc6bf3..23ead4b6e 100644 --- a/packages/billing/gateway/src/components/pricing-table.tsx +++ b/packages/billing/gateway/src/components/pricing-table.tsx @@ -1,34 +1,34 @@ -'use client'; +"use client"; -import { useState } from 'react'; +import { useState } from "react"; -import Link from 'next/link'; +import Link from "next/link"; -import { ArrowRight, CheckCircle } from 'lucide-react'; -import { useTranslations } from 'next-intl'; -import * as z from 'zod'; +import { ArrowRight, CheckCircle } from "lucide-react"; +import { useTranslations } from "next-intl"; +import * as z from "zod"; import { BillingConfig, type LineItemSchema, getPlanIntervals, getPrimaryLineItem, -} from '@kit/billing'; -import { Badge } from '@kit/ui/badge'; -import { Button } from '@kit/ui/button'; -import { If } from '@kit/ui/if'; -import { Trans } from '@kit/ui/trans'; -import { cn } from '@kit/ui/utils'; +} from "@kit/billing"; +import { Badge } from "@kit/ui/badge"; +import { Button } from "@kit/ui/button"; +import { If } from "@kit/ui/if"; +import { Trans } from "@kit/ui/trans"; +import { cn } from "@kit/ui/utils"; -import { LineItemDetails } from './line-item-details'; -import { PlanCostDisplay } from './plan-cost-display'; +import { LineItemDetails } from "./line-item-details"; +import { PlanCostDisplay } from "./plan-cost-display"; interface Paths { signUp: string; return: string; } -type Interval = 'month' | 'year'; +type Interval = "month" | "year"; export function PricingTable({ config, @@ -57,8 +57,8 @@ export function PricingTable({ const visibleProducts = config.products.filter((product) => !product.hidden); return ( -
-
+
+
{intervals.length > 1 ? ( {visibleProducts.map((product) => { const plan = product.plans.find((plan) => { - if (plan.paymentType === 'recurring') { + if (plan.paymentType === "recurring") { return plan.interval === interval; } @@ -159,7 +159,7 @@ function PricingItem( const lineItem = props.primaryLineItem!; const isCustom = props.plan.custom ?? false; - const i18nKey = lineItem?.unit ? `billing.units.${lineItem.unit}` : ''; + const i18nKey = lineItem?.unit ? `billing.units.${lineItem.unit}` : ""; const unitLabel = lineItem?.unit ? t.has(i18nKey) @@ -168,31 +168,31 @@ function PricingItem( defaultValue: lineItem.unit, } as never) : lineItem.unit - : ''; + : ""; - const isDefaultSeatUnit = lineItem?.unit === 'member'; + const isDefaultSeatUnit = lineItem?.unit === "member"; // we exclude flat line items from the details since // it doesn't need further explanation const lineItemsToDisplay = props.plan.lineItems.filter((item) => { - return item.type !== 'flat'; + return item.type !== "flat"; }); const interval = props.plan.interval as Interval; return (
-
+
-
-
-
+
+
+
-
+
-
+
} + fallback={} > {(interval) => ( @@ -268,7 +268,7 @@ function PricingItem( - + / - + } + fallback={} > -
+
-
+
-
+
-
-
- +
+
+
, ) { return ( -
    +
      {props.features.map((feature) => { return ( @@ -392,17 +392,17 @@ function Price({ > {children} - + / - +
@@ -416,18 +416,18 @@ function ListItem({ highlighted: boolean; }>) { return ( -
  • +
  • {children} @@ -446,40 +446,40 @@ function PlanIntervalSwitcher( return (
    {props.intervals.map((plan, index) => { const selected = plan === props.interval; const className = cn( - 'animate-in fade-in rounded-full transition-all focus:!ring-0', + "animate-in fade-in rounded-full transition-all focus:!ring-0", { - 'border-r-transparent': index === 0, - ['hover:text-primary text-muted-foreground']: !selected, - ['cursor-default']: selected, + "border-r-transparent": index === 0, + ["hover:text-primary text-muted-foreground"]: !selected, + ["cursor-default"]: selected, }, ); return ( );