HEX
Server: Apache
System: Linux webm003.cluster123.gra.hosting.ovh.net 6.18.39-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Tue Jul 21 12:03:15 CEST 2026 x86_64
User: vanessatli (59366)
PHP: 5.4.45
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/vanessatli/www/wp-content/plugins/themeisle-companion/dashboard/src/components/App.js
import '../style.scss';
import Header from './Header';
import Snackbar from './Snackbar';
import { DashboardContext } from './DashboardContext';
import { useState } from '@wordpress/element';
import { tabs, getTabHash } from '../utils/common';

const App = () => {
	const hash = getTabHash();
	const [activeTab, setActiveTab] = useState(hash ? hash : 'modules');
	const [toast, setToast] = useState();

	return (
		<DashboardContext.Provider value={{ toast, setToast }}>
			<Header activeTab={activeTab} setActiveTab={setActiveTab} />
			<div className="container">{tabs[activeTab].render()}</div>
			{toast && <Snackbar />}
		</DashboardContext.Provider>
	);
};

export default App;