Created
March 18, 2020 04:14
-
-
Save bautistaaa/32a4d974b6c1b27bb6763a0e98cfc049 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { Component } from 'react'; | |
| import './App.css'; | |
| import DummyStore from './dummy-store'; | |
| import Header from './Header'; | |
| import SidebarSection from './SidebarSection'; | |
| import NoteSection from './NoteSection'; | |
| class App extends Component { | |
| constructor(props) { | |
| super(props) | |
| this.state = { | |
| folders: DummyStore.folders, | |
| notes: DummyStore.notes, | |
| } | |
| } | |
| render() { | |
| return ( | |
| <div> | |
| <Header /> | |
| <main> | |
| <Sidebar> | |
| <Route | |
| path='/' | |
| render={(routerProps) => | |
| <SidebarSection | |
| folders={this.state.folders} | |
| ...routerProps | |
| /> | |
| } | |
| /> | |
| <Route | |
| path='/folder/:folderId' | |
| render={(routerProps) => | |
| <SidebarSection | |
| folders={this.state.folders} | |
| ...routerProps | |
| /> | |
| } | |
| /> | |
| </SideBar> | |
| <MainSection> | |
| <Route | |
| path='/' | |
| render={(routerProps) => | |
| <SidebarSection | |
| folders={this.state.folders} | |
| ...routerProps | |
| /> | |
| } | |
| /> | |
| <Route | |
| path='/folder/:folderId' | |
| render={(routerProps) => | |
| < | |
| folders={this.state.folders} | |
| ...routerProps | |
| /> | |
| } | |
| /> | |
| </MainSection> | |
| </main> | |
| </div> | |
| ); | |
| } | |
| } | |
| export default App; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment