style: run eslint and prettier
All checks were successful
TrafficCue CI / check (push) Successful in 58s
TrafficCue CI / build (push) Successful in 49s

This commit is contained in:
Cfp
2025-08-14 13:38:34 +02:00
parent 198cd4eb3d
commit 67e5cba264
3 changed files with 19 additions and 8 deletions

View File

@ -3,15 +3,21 @@
let { tags } = $props();
const TAGS = ["cuisine", "indoor_seating", "outdoor_seating", "takeaway", "drive_through"];
const TAGS = [
"cuisine",
"indoor_seating",
"outdoor_seating",
"takeaway",
"drive_through",
];
const matchingTags = TAGS.filter(tag => tag in tags);
const matchingTags = TAGS.filter((tag) => tag in tags);
</script>
{#if matchingTags.length > 0}
<h3 class="text-lg font-bold mt-2">Restaurant</h3>
<ul class="flex gap-2 flex-wrap">
{#each matchingTags as tag}
{#each matchingTags as tag, _index (tag)}
{#if tag != "no"}
<Badge>
{tag}{tags[tag] == "yes" ? "" : ": " + tags[tag]}

View File

@ -215,9 +215,10 @@
<Button
variant="outline"
onclick={() => {
alert(JSON.stringify(elements, null, 3))
alert(JSON.stringify(elements, null, 3));
console.log(elements);
}}>
}}
>
Show raw data
</Button>
{/if}
@ -257,7 +258,11 @@
<h3 class="text-lg font-bold mt-2">Payment Methods</h3>
<ul style="display: flex; flex-wrap: wrap; gap: 0.5rem;">
{#each Object.entries(tags).filter( ([key]) => key.startsWith("payment:"), ) as [key, value] (key)}
<Badge>{key.replace("payment:", "")}{value == "yes" ? "" : ": " + value}</Badge>
<Badge
>{key.replace("payment:", "")}{value == "yes"
? ""
: ": " + value}</Badge
>
{/each}
</ul>
{/if}