Feat: News in the client app (#34392)
This commit is contained in:
10
client/src/components/createRedirect.js
Normal file
10
client/src/components/createRedirect.js
Normal file
@@ -0,0 +1,10 @@
|
||||
import { navigate } from 'gatsby';
|
||||
|
||||
const createRedirect = (to = '/') => () => {
|
||||
if (typeof window !== 'undefined') {
|
||||
navigate(to);
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
export default createRedirect;
|
Reference in New Issue
Block a user