????JFIF??x?x????'
| Server IP : 172.67.174.47 / Your IP : 216.73.216.145 Web Server : LiteSpeed System : Linux premium151.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64 User : tempvsty ( 647) PHP Version : 8.0.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /././home/./tempvsty/eaabusiness.com/wp-content/themes/zakra/assets/js/dashboard/router/ |
Upload File : |
import React from 'react';
import { Route, Routes, useLocation } from 'react-router-dom';
import Dashboard from '../screens/dashboard/Dashboard';
import FreeVsPro from '../screens/free-vs-pro/FreeVsPro';
import Help from '../screens/help/Help';
import Products from '../screens/products/Products';
import { StarterTemplates } from '../screens/starter-templates/StarterTemplates';
const Router: React.FC = () => {
const { pathname } = useLocation();
React.useLayoutEffect(() => {
const submenu = document.querySelector(
`.wp-submenu a[href="admin.php?page=zakra#${pathname}"]`,
);
if (!submenu) return;
submenu.parentElement?.classList.add('current');
return () => {
submenu.parentElement?.classList?.remove('current');
};
}, [pathname]);
return (
<Routes>
<Route path="/" element={<Dashboard />} />
{/*<Route path="/settings" element={<Settings />} />*/}
<Route path="/demo-importer" element={<StarterTemplates />} />
<Route path="/products" element={<Products />} />
<Route path="/free-vs-pro" element={<FreeVsPro />} />
<Route path="/help" element={<Help />} />
<Route path="*" element={<Dashboard />} />
</Routes>
);
};
export default Router;