Skip to content

Instantly share code, notes, and snippets.

@tannerlinsley
Created November 8, 2016 16:51
Show Gist options
  • Save tannerlinsley/58dc0f34626c3a23b11098dd10733e34 to your computer and use it in GitHub Desktop.
Save tannerlinsley/58dc0f34626c3a23b11098dd10733e34 to your computer and use it in GitHub Desktop.
// Javascript
import { Render, Router, Route, Redirect, IndexRoute, IndexRedirect } from 'jumpsuit'
Render(state, (
<Router>
<Route path='/' component={Layout}>
<IndexRoute component={Teams} />
<Route path='me' component={Me} />
<Route path='workspaces' component={Workspaces} />
<Route path='invite' component={WorkspaceInvite} />
<Route path='new' component={WorkspaceNew} />
<Route path='dashboards' component={Dashboards}>
<Route path=':dashboardID' component={DashboardSingle} />
</Route>
<Route path='teams' component={Teams}>
<Route path=':teamID' component={Team}>
<IndexRedirect to='info' />
<Route path='info' component={TeamInfo} />
<Route path='keywords' component={TeamKeywords}>
<Route path='new' component={TeamKeyword} />
<Route path=':teamScheduleKeywordID' component={TeamKeyword} />
</Route>
<Route path='brands' component={TeamBrands}>
<Route path='new' component={TeamBrand} />
<Route path=':teamBrandID' component={TeamBrand} />
</Route>
<Route path='tags' component={TeamTags}>
<Route path='new' component={TeamTag} />
<Route path=':teamTagID' component={TeamTag} />
</Route>
<Route path='pulls' component={TeamPulls}>
<Route path='new' component={TeamPull} />
<Route path=':teamPullID' component={TeamPull} />
</Route>
</Route>
<Route path='new' component={Team} />
</Route>
<Route path='brands' component={Brands}>
<Route path=':brandID' component={Brand} />
<Route path='new' component={Brand} />
</Route>
<Route path='schedules' component={Schedules}>
<Route path=':scheduleID' component={Schedule}>
<Route path='edit' component={Schedule} />
</Route>
<Route path='new' component={Schedule} />
</Route>
<Route path='users' component={Users}>
<Route path=':userID' component={User}>
<Route path='edit' component={User} />
</Route>
<Route path='new' component={User} />
</Route>
<Route path='alerts' component={Alerts} />
<Redirect from='*' to='/' />
</Route>
</Router>
))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment