updates
This commit is contained in:
parent
d74a59ddde
commit
c1ed109a30
@ -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;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user