react-router redirect wrapper

This commit is contained in:
Sérgio Ramos 2016-12-15 14:08:43 +00:00
parent f02a4059f9
commit 1cffa72e16

View File

@ -0,0 +1,12 @@
const React = require('react');
const ReactRouter = require('react-router');
const {
Redirect
} = ReactRouter;
module.exports = (to) => () => {
return (
<Redirect to={to} />
);
};