Created
August 15, 2016 23:43
-
-
Save UberMouse/d0cf28177516a68a7abfea8a89442dfc 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
<Router history={browserHistory}> | |
<Route path="/stories" component={StoriesContainer} > | |
<IndexRoute component={MyStories} /> | |
<Route component={StoriesLayout}> | |
<Route path="new" component={NewStory} /> | |
<Route path="show"> | |
<Route path="stack" component={StackView} /> | |
<Route path="grid" component={GridView} /> | |
</Route> | |
</Route> | |
</Route> | |
</Router> |
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
export default function StoryLayout(props) { | |
return ( | |
<div> | |
<div className="row"> | |
<div className="medium-8 columns"> | |
<p><span style={{textDecoration: 'underline'}}>My stories</span> / {props.metadata.title}</p> | |
<ViewSwitcher /> | |
</div> | |
</div> | |
<div className="row"> | |
{React.cloneElement(props.children, omit(props, 'children'))} | |
</div> | |
</div> | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment