From 4d16ce2cc32444f7d2da12c063f2b5dd8311aade Mon Sep 17 00:00:00 2001 From: Miguel Vieira Date: Thu, 11 Jul 2024 07:34:45 +0100 Subject: [PATCH] feat(frontend): display place of origin Update the location count to count the place of origin instead of settlement --- frontend/src/routes/+page.svelte | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/frontend/src/routes/+page.svelte b/frontend/src/routes/+page.svelte index c769f81a15e..1f546063448 100644 --- a/frontend/src/routes/+page.svelte +++ b/frontend/src/routes/+page.svelte @@ -70,7 +70,7 @@ ); return maxYear - minYear; })(); - $: numberOfLocations = new Set(inscriptions.map((inscription) => inscription.settlement)).size; + $: numberOfLocations = new Set(inscriptions.map((inscription) => inscription.placeName)).size; onMount(() => { keywords = $page.url.searchParams.get('keywords') || ''; @@ -141,7 +141,15 @@ ? inscription.notAfter < 0 ? `${Math.abs(inscription.notAfter)} BC` : `AD ${inscription.notAfter}` - : 'Unknown'} + : 'Unknown'}{#if inscription.place}, + {@const place = inscription.place} + {#if place.offset}{place.offset}{/if} + {#if place.ref} + {place._} + {:else} + {place._} + {/if} + {/if}

Settlement