]> git.openstreetmap.org Git - nominatim-ui.git/blob - src/components/OsmLink.svelte
Merge remote-tracking branch 'upstream/master'
[nominatim-ui.git] / src / components / OsmLink.svelte
1 <script>
2 import { formatOSMType } from '../lib/helpers.js';
3
4 let { osmType, osmId } = $props();
5
6 const osmTypeString = $derived(formatOSMType(osmType, false));
7
8 const href = $derived(`https://www.openstreetmap.org/${osmTypeString}/${osmId}`);
9
10 </script>
11
12 {#if osmTypeString}
13 <a {href}>{osmTypeString} {osmId}</a>
14 {/if}