Skip to content
Snippets Groups Projects
Select Git revision
  • b80f869c8b23a243c554476d4e110455f6468b4b
  • 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
  • Forked from KSZK / DevTeam / kszkepzes / old / kszkepzes-frontend
    Source project has a limited visibility.
    Main.js 1.00 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 EventDetail from './pages/EventDetail';
    
    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='/events/:id' component={EventDetail} />
        <Route component={NotFound} />
      </Switch>
    );
    
    export default Main;