2021-08-02 18:04:06 +00:00
|
|
|
import { useRouter } from "next/router";
|
2021-03-22 13:48:48 +00:00
|
|
|
|
2021-08-02 18:04:06 +00:00
|
|
|
function RedirectPage() {
|
|
|
|
const router = useRouter();
|
|
|
|
if (typeof window !== "undefined") {
|
|
|
|
router.push("/event-types");
|
|
|
|
return;
|
|
|
|
}
|
2021-07-15 14:10:26 +00:00
|
|
|
}
|
2021-08-02 18:04:06 +00:00
|
|
|
|
|
|
|
RedirectPage.getInitialProps = (ctx) => {
|
|
|
|
if (ctx.res) {
|
|
|
|
ctx.res.writeHead(302, { Location: "/event-types" });
|
|
|
|
ctx.res.end();
|
|
|
|
}
|
|
|
|
return {};
|
|
|
|
};
|
|
|
|
|
|
|
|
export default RedirectPage;
|