Skip to content

Commit

Permalink
Add a redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
gavinhenderson committed Jul 24, 2024
1 parent 8ad74d9 commit 3909481
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions pages/learning/[slug].js
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import { Footer } from "../../components/footer/footer";
import { defaultNavItems } from "../../components/sub-nav/sub-nav";
import { CombinedNav } from "../../components/combined-nav/combined-nav";
import { redirect } from "next/navigation";

export default function LearningDetail() {
redirect("https://acecentre.arlo.co/w/events/");

return (
<>
<header>
Expand All @@ -24,9 +21,10 @@ export async function getStaticPaths() {
};
}

export const getStaticProps = async ({ res }) => {
res.writeHead(301, { Location: "https://acecentre.arlo.co/w/events/" });
res.end();

return { props: {} };
export const getStaticProps = async () => {
return {
redirect: {
destination: "https://acecentre.arlo.co/w/events/",
},
};
};

0 comments on commit 3909481

Please sign in to comment.