diff --git a/src/routes/[country]/[location]/index.svelte b/src/routes/[country]/[location]/index.svelte index 846adb7..c2c68ad 100644 --- a/src/routes/[country]/[location]/index.svelte +++ b/src/routes/[country]/[location]/index.svelte @@ -23,6 +23,7 @@ let currentPage: number = 1 let ended: boolean let currentPhotosAmount: number + $: latestPhoto = photos[0] $: currentPhotosAmount = photos.length $: ended = currentPhotosAmount === totalPhotos @@ -120,12 +121,14 @@ {/if} {/each}

- · -

- Updated -

+ {#if latestPhoto} + · +

+ Updated +

+ {/if}
@@ -258,8 +261,8 @@ props: { data: data.location[0], photos: data.photos, - totalPhotos: locationPhotosCount.count.id, - lastUpdated: data.photos[0].date_created, + totalPhotos: data.photos.length ? locationPhotosCount.count.id : 0, + lastUpdated: data.photos.length ? data.photos[0].date_created : undefined, } } }