mirror of
https://github.com/yldio/copilot.git
synced 2024-11-14 07:10:05 +02:00
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