import { useState } from '@wordpress/element'; import Dashboard from './pages/Dashboard'; import Settings from './pages/Settings'; const { __ } = wp.i18n; export default function App() { const [currentPage, setCurrentPage] = useState( window.location.hash === '#settings' ? 'settings' : 'dashboard' ); const navigate = (page) => { setCurrentPage(page); window.location.hash = page === 'settings' ? '#settings' : ''; }; return (