import React from 'react';
import ReactDOM from 'react-dom/client';
import './index.css';
import App from './App';
import Teams from './Teams';
import MyTeam from './MyTeam';
import Matches from './Matches';
import Leagues from './Leagues';
import Players from './Players';
import MyMatches from './MyMatches';
import FreePlayers from './FreePlayers';
import 'bootstrap/dist/css/bootstrap.css';
import { BrowserRouter, Routes, Route } from 'react-router-dom';

const root = ReactDOM.createRoot(document.getElementById('root'));

root.render(
  <React.StrictMode>
    <BrowserRouter>
      <Routes>
        <Route path='/' element={<App />} />
        <Route path="/teams:leagueId" element={<Teams />} />
        <Route path="/myteam" element={<MyTeam />} />
        <Route path="/leagues" element={<Leagues />} />
        <Route path="/matches/:leagueId" element={<Matches />} />
        <Route path="/players/" element={<Players />} />
        <Route path="/mymatches/" element={<MyMatches />} />
        <Route path="/freeplayers/" element={<FreePlayers />} />
      </Routes>
    </BrowserRouter>
  </React.StrictMode>
);
