added redirect check

This commit is contained in:
bill bittner 2018-02-21 17:34:29 -08:00
parent a5e026c1e0
commit 9fea56c8a2

View file

@ -25,6 +25,14 @@ module.exports = (req, res) => {
</Provider>
);
// check for a redirect
if (context.url) {
// Somewhere a `<Redirect>` was rendered
res.redirect(301, context.url);
} else {
// we're good, send the response
}
// get the initial state from our Redux store
const preloadedState = store.getState();