import React from 'react'; import { AlertTriangle, Cpu, HardDrive, Server, ArrowUpCircle } from 'lucide-react'; import { useResourceTier } from '../contexts/ResourceTierContext'; const ResourceGate = ({ children, feature = 'wordpress_create' }) => { const { tier, specs, features, loading, isLiteTier, canCreateWordPress } = useResourceTier(); // While loading, show nothing or a skeleton if (loading) { return children; } // Check if the specific feature is blocked const isBlocked = feature === 'wordpress_create' && !canCreateWordPress; if (!isBlocked) { return children; } // Minimum requirements const minCores = 2; const minRamGb = 2; return (

Server Resources Insufficient

WordPress site creation requires more server resources than currently available. Your server is classified as a Lite tier server.

Your Server
CPU Cores {specs?.cpu_cores || '?'}
RAM {specs?.ram_gb || '?'} GB
Minimum Required
CPU Cores {minCores}+
RAM {minRamGb}+ GB

Recommendation

Upgrade your server to at least {minCores} CPU cores and{' '} {minRamGb}GB RAM to enable WordPress site creation. A Standard or Performance tier server is recommended for optimal WordPress performance.

Lite
1 core or <2GB RAM
WordPress: Blocked
Standard
2-3 cores, 2-4GB RAM
WordPress: Allowed
Performance
4+ cores, >4GB RAM
WordPress: Allowed
); }; export default ResourceGate;