Skip to content
Snippets Groups Projects
Select Git revision
  • 681d6971cae516722031abc708570da66b0ca738
  • master default protected
  • 1.3.1
  • 1.3.0
  • 1.2.0
  • 1.1.5
  • 1.1.4
  • 1.1.3
  • 1.1.2
  • 1.1.1
  • 1.1.0
  • 1.0.19
  • 1.0.18
  • 1.0.17
  • 1.0.16
  • 1.0.15
  • 1.0.14
  • 1.0.13
  • 1.0.12
  • 1.0.10
  • 1.0.9
  • 1.0.8
22 results

Main.js

Blame
  • Main.js 1.32 KiB
    import React from 'react';
    import { Switch, Route, Redirect, withRouter } from 'react-router-dom';
    
    import Home from './pages/Home';
    import Trainers from './pages/Trainers';
    import Schedule from './pages/Schedule';
    import NotFound from './pages/NotFound';
    import Profile from './pages/Profile';
    import Statistics from './pages/Statistics';
    import Groups from './pages/Groups';
    import News from './pages/News';
    import Homework from './pages/Homework';
    import Applications from './pages/Applications';
    import EventDetail from './pages/EventDetail';
    import ApplicantProfile from './pages/ApplicantProfile';
    
    const Main = () => (
      <Switch>
        <Redirect exact from='/' to='/home' />
        <Route exact path='/home' component={Home} />
        <Route path='/news' component={News} />
        <Route path='/trainers' component={Trainers} />
        <Route path='/schedule' component={Schedule} />
        <Route path='/profile' component={withRouter(Profile)} />
        <Route path='/statistics' component={Statistics} />
        <Route path='/groups' component={Groups} />
        <Route path='/homework' component={Homework} />
        <Route path='/events/:id' component={EventDetail} />
        <Route path='/applications' component={Applications} />
        <Route path='/applicant/:id' component={ApplicantProfile} />
        <Route component={NotFound} />
      </Switch>
    );
    
    export default Main;