mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -07:00
Try passing props on falsy pageListing
This commit is contained in:
parent
66315cfc40
commit
73ebd03c57
1 changed files with 7 additions and 2 deletions
|
|
@ -41,7 +41,7 @@ export async function getStaticProps({ params }) {
|
||||||
// return JSON.parse(endpointsJson)
|
// return JSON.parse(endpointsJson)
|
||||||
// })
|
// })
|
||||||
|
|
||||||
const allEndpointListings = await fs.stat('./static/eleventy-endpointsdddd.json')
|
const allEndpointListings = await fs.stat('./static/eleventy-endpoints.json')
|
||||||
const currentDirectory = await fs.readdir('./')
|
const currentDirectory = await fs.readdir('./')
|
||||||
|
|
||||||
// console.log('endpointListings', endpointListings[0])
|
// console.log('endpointListings', endpointListings[0])
|
||||||
|
|
@ -74,7 +74,12 @@ export async function getStaticProps({ params }) {
|
||||||
...pageListing
|
...pageListing
|
||||||
},
|
},
|
||||||
revalidate: ONE_MINUTE
|
revalidate: ONE_MINUTE
|
||||||
} : { notFound: true }
|
} : {
|
||||||
|
notFound: true,
|
||||||
|
props: {
|
||||||
|
error: 'falsy pageListing'
|
||||||
|
},
|
||||||
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// The Twitter API most likely died
|
// The Twitter API most likely died
|
||||||
console.error(error)
|
console.error(error)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue