Skip to content

Commit

Permalink
fix: whats-new page instead of 404
Browse files Browse the repository at this point in the history
  • Loading branch information
pavittarx authored Oct 27, 2021
1 parent d6c410b commit 3fa0e02
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pages/whats-new.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,24 +28,24 @@ export async function getServerSideProps(context) {
};
} catch (err) {
notify(err?.response?.data?.message ?? err?.message, 'error');

return {
redirect: {
permanent: false,
destination: "/404"
props: {
blogs: []
}
};
}
}
}

export default function whatsNew(props) {
export default function whatsNew({blogs}) {
return (
<>
<Head>
<title> What's new | Nullcast</title>
</Head>
<SiteHeader />
<WhatsNewSpotlight />
<WhatsNewPosts blogs={props.blogs} />
{ blogs?.length > 0 && <WhatsNewPosts blogs={props.blogs} />}
<SectionSwag />
<SiteFooter />
</>
Expand Down

0 comments on commit 3fa0e02

Please sign in to comment.