Skip to content

Commit

Permalink
error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
dietrichmax committed Jan 25, 2024
1 parent 1f3d694 commit ef23daa
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
Binary file modified public/wallpaper/backgroundImage.webp
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ const Map = () => {
// similar to componentDidMount() lifecycle method of class-based
// components:
useEffect(() => {
const map = L.map("map", mapParams)
const map = L.map("map-geojson", mapParams)
L.geoJSON(getGeoJson()).addTo(map)
}, [])

return (
<div>
<div id="map" style={mapStyles} />
<div id="map-geojson" style={mapStyles} />
</div>
)
}
Expand Down
20 changes: 10 additions & 10 deletions src/data/external/cms.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ export async function getPostById(id) {
const json = await res.json()
if (json.errors) {
console.error(json.errors)
throw new Error("Failed to fetch STRAPI API")
throw new Error("Failed to fetch Post by ID")
}

return json
Expand Down Expand Up @@ -361,7 +361,7 @@ export async function getLinksCount() {
const json = await res.json()
if (json.errors) {
console.error(json.errors)
throw new Error("Failed to fetch STRAPI API")
throw new Error("Failed to fetch Links count")
}

return json
Expand All @@ -381,7 +381,7 @@ export async function getCommentsCount() {
const json = await res.json()
if (json.errors) {
console.error(json.errors)
throw new Error("Failed to fetch STRAPI API")
throw new Error("Failed to fetch STRAPI Comments count")
}

return json
Expand All @@ -401,7 +401,7 @@ export async function getPostsCount() {
const json = await res.json()
if (json.errors) {
console.error(json.errors)
throw new Error("Failed to fetch STRAPI API")
throw new Error("Failed to fetch Posts count")
}

return json
Expand All @@ -421,7 +421,7 @@ export async function getTagsCount() {
const json = await res.json()
if (json.errors) {
console.error(json.errors)
throw new Error("Failed to fetch STRAPI API")
throw new Error("Failed to fetch Tags count")
}

return json
Expand All @@ -441,7 +441,7 @@ export async function getRecipesCount() {
const json = await res.json()
if (json.errors) {
console.error(json.errors)
throw new Error("Failed to fetch STRAPI API")
throw new Error("Failed to fetch Recipes count")
}

return json
Expand All @@ -461,7 +461,7 @@ export async function getRoutesCount() {
const json = await res.json()
if (json.errors) {
console.error(json.errors)
throw new Error("Failed to fetch STRAPI API")
throw new Error("Failed to fetch Routes count")
}

return json
Expand All @@ -481,7 +481,7 @@ export async function getSubscribersCount() {
const json = await res.json()
if (json.errors) {
console.error(json.errors)
throw new Error("Failed to fetch STRAPI API")
throw new Error("Failed to fetch Subscribers count")
}

return json
Expand All @@ -501,7 +501,7 @@ export async function getPhotosCount() {
const json = await res.json()
if (json.errors) {
console.error(json.errors)
throw new Error("Failed to fetch STRAPI API")
throw new Error("Failed to fetch Photos count")
}

return json
Expand All @@ -521,7 +521,7 @@ export async function getActivitiesCount() {
const json = await res.json()
if (json.errors) {
console.error(json.errors)
throw new Error("Failed to fetch STRAPI API")
throw new Error("Failed to fetch activities count")
}

return json
Expand Down

0 comments on commit ef23daa

Please sign in to comment.