Guest User

Untitled

a guest
Dec 12th, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. <div id="router-container">
  2. <Header />
  3.  
  4. <Switch>
  5. <Route path="/dashboard" component={DashboardPage} />
  6. <Route path="/settings" component={SettingsPage} />
  7. </Switch>
  8. </div>
  9.  
  10. const DashboardPage = () => (
  11. <div id="dashboard-page">
  12. ...content
  13. <Footer onRightButtonClick={myDashboardPageClickHandler} />
  14. </div>
  15. );
  16.  
  17. const SettingsPage = () => (
  18. <div id="settings-page">
  19. ...content
  20. <Footer onRightButtonClick={mySettingsPageClickHandler} />
  21. </div>
  22. );
  23.  
  24. <div id="router-container">
  25. <Header />
  26.  
  27. <Switch>
  28. <Route path="/dashboard" component={DashboardPage} />
  29. <Route path="/settings" component={SettingsPage} />
  30. </Switch>
  31.  
  32. <Footer />
  33. </div>
  34.  
  35. const DashboardPage = () => {
  36.  
  37. // set the onClick of the footer somehow to myDashboardPageClickHandler()
  38.  
  39. return (
  40. <div id="dashboard-page">
  41. ...content
  42. </div>
  43. );
  44. };
Add Comment
Please, Sign In to add comment