aboutsummaryrefslogtreecommitdiff
path: root/src/lib/components/BestRef.svelte
blob: e1948765d6e73bb106ac989b0708ed521f261b85 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

<script lang="ts">
	import type { Reference } from '$lib/server/services/types';

	let { ref }: { ref: Reference } = $props();
</script>

<span class="best-ref">
	{ref.reference}
	{#if ref.price && ref.unit}
		&nbsp;{ref.price.toFixed(2)}
		{ref.unit}
	{/if}
	{#if ref.qualityScore != null}
		&nbsp;({ref.qualityScore}/100)
	{/if}
</span>