Skip to content

Instantly share code, notes, and snippets.

@gCardinal
Created February 13, 2017 18:55
Show Gist options
  • Save gCardinal/de368d40bd3502032585ce94f36aa565 to your computer and use it in GitHub Desktop.
Save gCardinal/de368d40bd3502032585ce94f36aa565 to your computer and use it in GitHub Desktop.
// Routing configuration
// All my imports
const defaultComponents = {
footer: FooterSection,
header: HeaderSection,
}
export default () => (
<Route path='/'>
<IndexRedirect to='conversations' />
<Route component={CoreLayout}>
<Route
path='conversations'
components={{
...defaultComponents,
primary: ConversationsList,
placeholder: ConversationPlaceholder,
}}
/>
<Route
path='conversations/:id'
components={{
...defaultComponents,
primary: ConversationsList,
secondary: Conversation,
}}
/>
</Route>
<Route component={SingleSectionLayout}>
<Route
path='*'
components={{...defaultComponents, content: NotFound}}
/>
</Route>
</Route>
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment