react-router redirect wrapper
This commit is contained in:
parent
f02a4059f9
commit
1cffa72e16
12
frontend/src/components/redirect/index.js
Normal file
12
frontend/src/components/redirect/index.js
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
const React = require('react');
|
||||||
|
const ReactRouter = require('react-router');
|
||||||
|
|
||||||
|
const {
|
||||||
|
Redirect
|
||||||
|
} = ReactRouter;
|
||||||
|
|
||||||
|
module.exports = (to) => () => {
|
||||||
|
return (
|
||||||
|
<Redirect to={to} />
|
||||||
|
);
|
||||||
|
};
|
Loading…
Reference in New Issue
Block a user