Renders premium pricing UI with client-side state and toast notifications for plan selection.
"use client";
import { useState } from "react";
import { toast } from "sonner";
import { useRouter } from "next/navigation";
import { Label, Radio, RadioGroup } from "@headlessui/react";
import { CheckIcon, CreditCardIcon, SparklesIcon } from "lucide-react";
import { capitalCase } from "capital-case";
import Link from "next/link";
import { env } from "@/env";
import { LoadingContent } from "@/components/LoadingContent";
import { usePremium } from "@/components/PremiumAlert";
import { Button } from "@/components/ui/button";
import { getUserTier } from "@/utils/premium";
import {
pricingAdditonalEmail,
type Tier,
tiers,
} from "@/app/(app)/premium/config";
import { AlertWithButton } from "@/components/Alert";
import { TooltipExplanation } from "@/components/TooltipExplanation";
import
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search 40K more like it.
Get a free API key