import React from 'react';
import { Routes, Route, Navigate} from 'react-router-dom';
import Home from '@/pages/index.jsx';
import Login from '@/pages/login';
import User from '@/pages/user';
import {LayoutApp,LayoutProvider} from '@/components/Layout';
import {AuthLogin} from '@/components/Auth';
export const RouteList = (
  <Routes>
    <Route path='/' element={<LayoutProvider />}>
      <Route path='/' element={<LayoutApp />}>
        
        <Route path='/' element={<Navigate to='/demo/1001?type=test&name=demo' />} />
        <Route path='/demo/:id' element={<Home />} />
        <Route path='/user'  element={<AuthLogin><User /></AuthLogin>} />
      </Route>
      <Route path='/login' element={<Login />} />
    </Route>
  </Routes>
);
