style: run eslint and prettier
This commit is contained in:
@ -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]}
|
||||
|
||||
@ -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}
|
||||
|
||||
Reference in New Issue
Block a user