main_20190417153447.js 785 Bytes
Newer Older
baiguangyao committed
1 2 3 4 5 6 7 8 9
import React from 'react';
import { Switch, Route } from 'react-router-dom';

import Menu from './menu';
import Index from './components/Index';
import Classify from './components/classify';
import Study from './components/study';
import My from './components/my';

10 11
import './styles/index.scss';

baiguangyao committed
12 13 14 15 16

const main = () => (
    <div style={{ backgroundColor: 'rgb(245, 245, 249)', textAlign: 'center' }}>
        <div>
            <Switch>
17
                <Route path='/index' exact component={Index}></Route>
baiguangyao committed
18 19 20 21 22 23 24 25 26 27
                <Route path='/classify' component={Classify}></Route>
                <Route path='/study' component={Study}></Route>
                <Route path='/my' component={My}></Route>
            </Switch>
        </div>
        <Menu />
    </div>
)

export default main;