Skip to content

Commit

Permalink
Should remove the issue with the error message displayed before load
Browse files Browse the repository at this point in the history
  • Loading branch information
jesperlauridsen authored and jorntx committed Aug 10, 2023
1 parent 8ad12fa commit b47fdc7
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/js/src/views/PageHarvestData.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div class="contentContainerHarvestTimes">
<notifications />
<div v-if="harvestTimesData">
<div v-if="dataFound || dataFound === null">
<h2>
{{ harvestTimesData.pageUrl }}
</h2>
Expand Down Expand Up @@ -48,7 +48,8 @@ export default {
data: () => ({
harvestTimesData:null,
sourceFilePath: null,
offset:null
offset:null,
dataFound:null
}),
mounted() {
Expand All @@ -57,10 +58,12 @@ export default {
requestService.getHarvestedPageResources(this.sourceFilePath, this.offset)
.then(data => {
this.harvestTimesData = data
this.dataFound = true
/* Uncomment for local test only */
//this.harvestTimesData.notHarvested = ['http://foobar.dk/images/bar/lorem/public/images/icon_facebook.png','http://foobar.dk/images/bar/lorem/public/images/icon_instagram.png','http://foobar.dk/images/bar/lorem/public/images/payment_icon.png','http://foobar.dk/images/bar/lorem/public/images/icon_favorite.png']
//this.harvestTimesData.notHarvested = []
this.harvestTimesData.notHarvested = []
}).catch(() => {
this.dataFound = false
this.setNotification({
title: 'We are so sorry!',
text: 'Something went wrong when fetching the harvest data for this page - please try again',
Expand All @@ -78,7 +81,7 @@ export default {
getPrettyDate(date) {
return toHumanDate(new Date(date), true, true)
}
},
},
}
</script>

Expand Down

0 comments on commit b47fdc7

Please sign in to comment.