This repository has been archived on 2025-11-09. You can view files and clone it, but cannot push or open issues or pull requests.
Files
trafficcue-client/src/lib/components/lnv/info/RestaurantInfo.svelte
Cfp 4e3f1b06b2
Some checks failed
TrafficCue CI / check (push) Failing after 32s
TrafficCue CI / build (push) Failing after 35s
feat: translate all pages
2025-08-14 16:05:35 +02:00

30 lines
626 B
Svelte

<script>
import { m } from "$lang/messages";
import Badge from "$lib/components/ui/badge/badge.svelte";
let { tags } = $props();
const TAGS = [
"cuisine",
"indoor_seating",
"outdoor_seating",
"takeaway",
"drive_through",
];
const matchingTags = TAGS.filter((tag) => tag in tags);
</script>
{#if matchingTags.length > 0}
<h3 class="text-lg font-bold mt-2">{m["sidebar.info.restaurant"]()}</h3>
<ul class="flex gap-2 flex-wrap">
{#each matchingTags as tag, _index (tag)}
{#if tag != "no"}
<Badge>
{tag}{tags[tag] == "yes" ? "" : ": " + tags[tag]}
</Badge>
{/if}
{/each}
</ul>
{/if}