This commit is contained in:
Tben 2022-08-06 20:13:04 +01:00
parent d74a59ddde
commit c1ed109a30

View File

@ -146,14 +146,14 @@ export async function getStaticProps({ params }) {
.end(); .end();
}); });
if (!postsResponse.success || !postsResponse.payload[0]) { // if (!postsResponse.success || !postsResponse.payload[0]) {
return { // return {
redirect: { // redirect: {
destination: "/blog", // destination: "/blog",
permanent: false // permanent: false
} // }
} // }
} // }
const post = postsResponse.payload[0]; const post = postsResponse.payload[0];
@ -232,14 +232,14 @@ export async function getStaticPaths() {
.end(); .end();
}); });
if (!postsResponse.success) { // if (!postsResponse.success) {
return { // return {
redirect: { // redirect: {
destination: "/blog", // destination: "/blog",
permanent: false // permanent: false
} // }
} // }
} // }
const posts = postsResponse.payload; const posts = postsResponse.payload;