Skip to content

Instantly share code, notes, and snippets.

@UberMouse
Created August 15, 2016 23:43
Show Gist options
  • Save UberMouse/d0cf28177516a68a7abfea8a89442dfc to your computer and use it in GitHub Desktop.
Save UberMouse/d0cf28177516a68a7abfea8a89442dfc to your computer and use it in GitHub Desktop.
<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>
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