1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-22 14:29:36 +02:00

chore: Refactor adventure form components and improve image handling

This commit is contained in:
Sean Morley 2024-08-17 14:21:55 -04:00
parent b9ebbafd76
commit 167154bed4
2 changed files with 59 additions and 32 deletions

View file

@ -22,6 +22,8 @@
export let startDate: string | null = null;
export let endDate: string | null = null;
let noPlaces: boolean = false;
export let adventureToEdit: Adventure;
images = adventureToEdit.images || [];
@ -86,6 +88,11 @@
console.log(res);
let data = (await res.json()) as OpenStreetMapPlace[];
places = data;
if (data.length === 0) {
noPlaces = true;
} else {
noPlaces = false;
}
}
async function reverseGeocode() {
@ -395,7 +402,7 @@
{/each}
</div>
</div>
{:else}
{:else if noPlaces}
<p class="text-error text-lg">No results found</p>
{/if}
<!-- </div> -->