updates
This commit is contained in:
parent
b8368b503d
commit
d74a59ddde
@ -35,12 +35,6 @@ export default function BlogIndex({ blogPost }) {
|
|||||||
/** ********************************************** */
|
/** ********************************************** */
|
||||||
|
|
||||||
// ## Javascript Variables
|
// ## Javascript Variables
|
||||||
let reactKey = 0;
|
|
||||||
|
|
||||||
/** ********************************************** */
|
|
||||||
/** ********************************************** */
|
|
||||||
/** ********************************************** */
|
|
||||||
|
|
||||||
|
|
||||||
/** ********************************************** */
|
/** ********************************************** */
|
||||||
/** ********************************************** */
|
/** ********************************************** */
|
||||||
@ -152,7 +146,7 @@ export async function getStaticProps({ params }) {
|
|||||||
.end();
|
.end();
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!postsResponse.success) {
|
if (!postsResponse.success || !postsResponse.payload[0]) {
|
||||||
return {
|
return {
|
||||||
redirect: {
|
redirect: {
|
||||||
destination: "/blog",
|
destination: "/blog",
|
||||||
@ -172,6 +166,7 @@ export async function getStaticProps({ params }) {
|
|||||||
props: {
|
props: {
|
||||||
blogPost: post,
|
blogPost: post,
|
||||||
},
|
},
|
||||||
|
revalidate: 1000
|
||||||
};
|
};
|
||||||
|
|
||||||
/** ********************************************** */
|
/** ********************************************** */
|
||||||
@ -256,7 +251,7 @@ export async function getStaticPaths() {
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
paths: paths,
|
paths: paths,
|
||||||
fallback: true,
|
fallback: "blocking",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user