Allows passing custom data to extra routes

This commit is contained in:
Vlad
2018-01-20 20:57:59 -05:00
parent e00d43e506
commit 07417391be

View File

@@ -50,7 +50,9 @@ if (container) {
{/* Sending options */}
<Route path="send/:id" component={NewsletterSend} />
{/* Extra routes */}
{ extraRoutes.map(rt => <Route key={rt.path} path={rt.path} component={rt.component} />) }
{extraRoutes.map(rt =>
<Route key={rt.path} path={rt.path} component={rt.component} data={rt.data || null} />
)}
</Route>
</Router>
), container);