/** * Essential SEO Page Component * * Single page with tabbed interface for all SEO settings * * @package ThinkRank * @since 1.0.0 */ import { useState, useEffect } from '@wordpress/element'; import { __ } from '@wordpress/i18n'; import { Spinner, Notice } from '@wordpress/components'; // New sidebar navigation components import SidebarNavigation from '../essential-seo/SidebarNavigation'; import ContentArea from '../essential-seo/ContentArea'; /** * Essential SEO Component */ const EssentialSEO = () => { const [isLoading, setIsLoading] = useState(true); const [hasError, setHasError] = useState(false); const [errorMessage, setErrorMessage] = useState(''); // Navigation state const [activeSection, setActiveSection] = useState('site-identity'); const [activeItem, setActiveItem] = useState('basic-info'); // Initialize component useEffect(() => { const initializeEssentialSEO = async () => { try { setIsLoading(false); } catch (error) { setHasError(true); setErrorMessage(error.message); setIsLoading(false); } }; initializeEssentialSEO(); }, []); // Navigation handlers const handleNavigate = (sectionId, itemId) => { setActiveSection(sectionId); setActiveItem(itemId); }; // Render loading state if (isLoading) { return (
{__('Loading Essential SEO settings...', 'thinkrank')}
{__('Configure your site-wide SEO settings with AI-powered optimization', 'thinkrank')}