import React, {FunctionComponent} from 'react';
import './App.scss';
import {BrowserRouter as Router, Route, Switch, Redirect} from 'react-router-dom';

import {library} from "@fortawesome/fontawesome-svg-core";
import {faArrowCircleLeft, faArrowCircleRight} from "@fortawesome/free-solid-svg-icons";
import MainPage, {IMainPageProps} from "./pages/MainPage/MainPage";

library.add(faArrowCircleLeft, faArrowCircleRight)

const App: FunctionComponent = () => (
    <Router>
        <Switch>
            <Route path={'/season/:id?'} component={(props: IMainPageProps) => (<MainPage {...props}/>)} />
            <Redirect to={'/season'} />
        </Switch>
    </Router>
);

export default App;