import React from 'react';
import { BrowserRouter, Routes, Route } from 'react-router-dom';

import Dashboard from '@/page/dashboard/index';
import Home from '@/page/home/index';
import Setting from '@/page/setting/index';
import App404 from './app-404';

const AppRoute = () => (
  <BrowserRouter>
    <Routes>
      <Route path="/" element={<Dashboard />}>
        <Route index={true} element={<Home />} />
        <Route path="setting" element={<Setting />} />
      </Route>
      <Route path="*" element={<App404 />} />
    </Routes>
  </BrowserRouter>
);

export default AppRoute;
