import React from "react"; import { SparklesIcon, LockIcon } from "@sanity/icons"; interface Props { feature: string; children: React.ReactNode; isPro: boolean; variant?: "page" | "card"; } const PRO_FEATURES = [ { label: "SEO Health Dashboard", desc: "Score all pages at a glance" }, { label: "SEO Optimizer", desc: "Bulk edit meta fields across all pages" }, { label: "SERP Preview", desc: "Pixel-accurate desktop + mobile preview" }, { label: "Schema.org Wizard", desc: "13 structured data types" }, { label: "CSV Export / Import", desc: "Bulk update via spreadsheet" }, ]; function PageGate({ feature }: { feature: string }) { return (
Pro Coming Soon
{feature}
This feature is part of{" "} sanity-plugin-seo Pro . We're working on making it available — add your license key below when ready.
What's included with Pro
{PRO_FEATURES.map((item) => (
{item.label}
{item.desc}
))}
Already have a key?
proFeature: process.env.SEO_PRO_LICENSE_KEY
); } function CardGate({ feature }: { feature: string }) { return (
{feature}
Pro Coming Soon
This feature is part of the Pro plan. Add your license key to{" "} proFeature {" "} in your plugin config to unlock it.
); } export default function ProGate({ feature, children, isPro, variant = "card" }: Props) { if (isPro) return children as React.ReactElement; if (variant === "page") return ; return ; }