summaryrefslogtreecommitdiffstatshomepage
path: root/frontend/src/lib/pills
diff options
context:
space:
mode:
authorWolfgang Müller2025-02-26 16:50:05 +0100
committerWolfgang Müller2025-02-26 17:38:53 +0100
commit9a141a11ed6b8de153b7d6eac1661c23a2f153fe (patch)
treefc042582970671fda99af4434016dbff77894b0d /frontend/src/lib/pills
parentbcae21a8dee949303749d81052a154be5e7daf01 (diff)
downloadhircine-9a141a11ed6b8de153b7d6eac1661c23a2f153fe.tar.gz
frontend: Use joinText in TagPill
We basically already had a function that does what we need here, so there's no need to reimplement it just for TagPill.
Diffstat (limited to 'frontend/src/lib/pills')
-rw-r--r--frontend/src/lib/pills/TagPill.svelte3
1 files changed, 2 insertions, 1 deletions
diff --git a/frontend/src/lib/pills/TagPill.svelte b/frontend/src/lib/pills/TagPill.svelte
index c97c722..bbd3c55 100644
--- a/frontend/src/lib/pills/TagPill.svelte
+++ b/frontend/src/lib/pills/TagPill.svelte
@@ -1,5 +1,6 @@
<script lang="ts">
import type { ComicTag } from '$gql/graphql';
+ import { joinText } from '$lib/Utils';
import Pill from './Pill.svelte';
interface Props extends Pick<ComicTag, 'name' | 'description'> {
@@ -9,7 +10,7 @@
let { name, description, highlight = false }: Props = $props();
let [namespace, tag] = name.split(':');
- let tooltip = [name, description].filter((v) => v).join('\n\n');
+ let tooltip = joinText([name, description], '\n\n');
</script>
<Pill {highlight} name={tag} style={namespace} {tooltip}></Pill>