import React from 'react';
import {BrowserRouter as Router, Route, Switch} from 'react-router-dom';
import moment from 'moment-jalaali';
import HomePage from './components/home';
import DefaultPage from './components/default';
import LoginPage from './components/login';
import OrdersPage from './components/orders';
import StudentsCountPage from './components/students-count';

function App() {
  return (
    <Router basename={process.env.PUBLIC_URL}>
      <Switch>
        <Route exact path='/' component={HomePage} />
        <Route exact path='/login' component={LoginPage} />
        <Route exact path='/orders' component={OrdersPage} />
        <Route exact path='/students-count' component={StudentsCountPage} />
        <Route path='*' component={DefaultPage} />
      </Switch>
    </Router>
  );
}

moment.loadPersian({usePersianDigits: false, dialect: 'persian-modern'});

export default App;
