Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div id="router-container">
- <Header />
- <Switch>
- <Route path="/dashboard" component={DashboardPage} />
- <Route path="/settings" component={SettingsPage} />
- </Switch>
- </div>
- const DashboardPage = () => (
- <div id="dashboard-page">
- ...content
- <Footer onRightButtonClick={myDashboardPageClickHandler} />
- </div>
- );
- const SettingsPage = () => (
- <div id="settings-page">
- ...content
- <Footer onRightButtonClick={mySettingsPageClickHandler} />
- </div>
- );
- <div id="router-container">
- <Header />
- <Switch>
- <Route path="/dashboard" component={DashboardPage} />
- <Route path="/settings" component={SettingsPage} />
- </Switch>
- <Footer />
- </div>
- const DashboardPage = () => {
- // set the onClick of the footer somehow to myDashboardPageClickHandler()
- return (
- <div id="dashboard-page">
- ...content
- </div>
- );
- };
Add Comment
Please, Sign In to add comment