fix: handle error and console.log

This commit is contained in:
Maël Gangloff
2024-08-27 20:02:38 +02:00
parent 46ac93df89
commit 0d8c57265e
2 changed files with 5 additions and 5 deletions

View File

@@ -13,7 +13,7 @@ export default function TextPage({resource}: { resource: string }) {
axios.get('/content/' + resource)
.then(res => setMarkdown(res.data))
.catch(err => {
console.error(err)
console.error(`Please create the /public/content/${resource} file.`)
setMarkdown(undefined)
})
.finally(() => setLoading(false))