index.js 803 B

1234567891011121314151617181920212223242526272829303132
  1. import React, {Component} from 'react'
  2. import './index.css'
  3. import {Switch, Route} from 'react-router-dom'
  4. import All from './all'
  5. import Kind from './kind'
  6. import Detail from './detail'
  7. class Home extends Component {
  8. constructor(props) {
  9. super(props)
  10. this.state = {
  11. }
  12. }
  13. render() {
  14. return (
  15. <div style={{height: '100%'}}>
  16. <Switch>
  17. <Route exact path="/" component={All}/>
  18. <Route path="/home" component={All}/>
  19. <Route path="/home/all" component={All}/>
  20. <Route path="/home/kind" component={Kind}/>
  21. <Route path="/home/detail" component={Detail}/>
  22. </Switch>
  23. </div>
  24. )
  25. }
  26. }
  27. export default Home