"use client" import React from "react" import { useActiveUser } from "@/hooks/useActiveUser" import { Lock, Sparkles, ArrowRight } from "lucide-react" import Link from "next/link" interface PremiumGateProps { featureKey: string; children: React.ReactNode; } export function PremiumGate({ featureKey, children }: PremiumGateProps) { const { hasAccessTo, loading, user } = useActiveUser(); // Allow children to render immediately without a blocking center spinner // so that pages mount instantly on route transition. if (loading || !user) { return <>{children}; } if (!hasAccessTo(featureKey)) { return (
{/* Background Glow */}

Premium Feature

You need an active plan to access this exclusive tool.

Upgrade Plan to Unlock
); } return <>{children}; }