Add a badge on locations for new photos

- The last updated date is taken from the latest photo of each location (without any other API call, just some data manipulation)
- Manipulation of data in the preload request instead of the code
This commit is contained in:
2020-05-06 17:12:07 +02:00
parent 3230cfa0d0
commit cd609cd710
8 changed files with 132 additions and 44 deletions

9
src/atoms/Badge.svelte Normal file
View File

@@ -0,0 +1,9 @@
<script>
// Props
export let text
export let size = 'small'
</script>
<div class="badge badge--{size}">
<span>{text}</span>
</div>