/** * License Activation Banner * * Shown when the Pro plugin is installed but no valid license is activated. * Provides a non-intrusive persistent banner at the top of every dashboard page * with a clear CTA to activate the license. */ import { Key, ArrowRight, X } from 'lucide-react' import { Button } from '@/components/ui/button' import { usePro } from '@/contexts/pro-context' import { useState } from 'react' export function LicenseActivationBanner() { const { isPro, license } = usePro() const [dismissed, setDismissed] = useState(false) // Only show when Pro plugin is installed but license is NOT active const hasProPlugin = license?.hasProPlugin || false if (isPro || !hasProPlugin || dismissed) { return null } const activationUrl = license?.activationUrl || '' const handleActivate = () => { if (activationUrl) { // Navigate to the WP admin license page (outside React dashboard) window.location.href = activationUrl } } return (

Swift Commerce Pro is installed but your license is not activated.

Activate your license to unlock all Pro features.

) }