57 lines
2.3 KiB
TypeScript
57 lines
2.3 KiB
TypeScript
import { BrowserRouter, Routes, Route } from 'react-router-dom';
|
|
import { Toaster } from 'react-hot-toast';
|
|
import Layout from './components/Layout';
|
|
import Dashboard from './pages/Dashboard';
|
|
import Login from './pages/Login';
|
|
import ProtectedRoute from './components/ProtectedRoute';
|
|
import Users from './pages/Users';
|
|
import Products from './pages/Products';
|
|
import Orders from './pages/Orders';
|
|
import Coupons from './pages/Coupons';
|
|
import Settings from './pages/Settings';
|
|
import Reports from './pages/Reports';
|
|
import Categories from './pages/Categories';
|
|
import Blogs from './pages/Blogs';
|
|
import Wiki from './pages/Wiki';
|
|
import Pets from './pages/Pets';
|
|
import UITexts from './pages/UITexts';
|
|
import Media from './pages/Media';
|
|
import CMS from './pages/CMS';
|
|
import WholesaleApplications from './pages/WholesaleApplications';
|
|
import Videos from './pages/Videos';
|
|
import ContactSubmissions from './pages/ContactSubmissions';
|
|
|
|
function App() {
|
|
return (
|
|
<BrowserRouter>
|
|
<Toaster position="top-center" toastOptions={{ className: 'font-vazir' }} />
|
|
<Routes>
|
|
<Route path="/login" element={<Login />} />
|
|
<Route element={<ProtectedRoute />}>
|
|
<Route path="/" element={<Layout />}>
|
|
<Route index element={<Dashboard />} />
|
|
<Route path="users" element={<Users />} />
|
|
<Route path="products" element={<Products />} />
|
|
<Route path="orders" element={<Orders />} />
|
|
<Route path="coupons" element={<Coupons />} />
|
|
<Route path="settings" element={<Settings />} />
|
|
<Route path="reports" element={<Reports />} />
|
|
<Route path="categories" element={<Categories />} />
|
|
<Route path="blogs" element={<Blogs />} />
|
|
<Route path="wiki" element={<Wiki />} />
|
|
<Route path="videos" element={<Videos />} />
|
|
<Route path="pets" element={<Pets />} />
|
|
<Route path="ui-texts" element={<UITexts />} />
|
|
<Route path="media" element={<Media />} />
|
|
<Route path="cms" element={<CMS />} />
|
|
<Route path="wholesale" element={<WholesaleApplications />} />
|
|
<Route path="contact" element={<ContactSubmissions />} />
|
|
</Route>
|
|
</Route>
|
|
</Routes>
|
|
</BrowserRouter>
|
|
);
|
|
}
|
|
|
|
export default App;
|