import React from 'react'
import { Switch, Route } from 'react-router'
import UserList from './users/components/UserList'
import LoginForm from './api/components/Login'
import ConfigList from './config/components/ConfigList'
import { Swisstennis, Matches, Players } from './swisstennis/components'
import SZTM from './sztm/components/SZTM'
import SMS from './sms/components/SMS'

class Routes extends React.Component {
    render () {
        return (
    <main>
        <Switch>
            {console.log('Route props', this.props)}
            <Route path='/users' render={() => (<UserList {...this.props}/>)} />
            <Route path='/login' render={() => (<LoginForm {...this.props}/>)} />
            <Route path='/config' render={() => (<ConfigList {...this.props}/>)} />
            <Route path='/matches' render={() => (<Matches {...this.props}/>)} />
            <Route path='/players' render={() => (<Players {...this.props}/>)} />
            <Route path='/swisstennis' render={() => (<Swisstennis {...this.props}/>)} />
            <Route path='/sztm' render={() => (<SZTM {...this.props}/>)} />
            <Route path='/sms' render={() => (<SMS {...this.props}/>)} />
        </Switch>
    </main>
        )
    }
}
/*const Routes = () => (
    
)*/

export default Routes