Main.js 663 B

1234567891011121314151617181920212223242526272829
  1. import React from 'react'
  2. import { Link } from 'react-router'
  3. // import './css/style.css'
  4. import './css/spectre.css'
  5. import Navigation from './Navigation'
  6. class Main extends React.Component {
  7. render () {
  8. const children = React.Children.map(this.props.children, child =>
  9. React.cloneElement(child, this.props)
  10. )
  11. console.log('Found these child elements:', children)
  12. return (
  13. <div>
  14. <Navigation />
  15. {children}
  16. <footer className='app-footer'>
  17. <section>
  18. <h2>AutoMate footer</h2>
  19. <p>some text</p>
  20. </section>
  21. </footer>
  22. </div>
  23. )
  24. }
  25. }
  26. export default Main