From 2f2d76fef55719290fe048048ef37b129fe8661b Mon Sep 17 00:00:00 2001
From: Fuwn <contact@fuwn.me>
Date: Fri, 19 Apr 2024 20:52:54 -0700
Subject: feat(badges): show badge id on dev

---
 src/lib/FallbackBadge.svelte | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

(limited to 'src/lib/FallbackBadge.svelte')

diff --git a/src/lib/FallbackBadge.svelte b/src/lib/FallbackBadge.svelte
index f7953e30..f78d6e03 100644
--- a/src/lib/FallbackBadge.svelte
+++ b/src/lib/FallbackBadge.svelte
@@ -5,6 +5,7 @@
 	import Tooltip from './Tooltip/LinkedTooltip.svelte';
 	import { databaseTimeToDate } from './Utility/time';
 	import { cubicOut } from 'svelte/easing';
+	import { dev } from '$app/environment';
 
 	export let source: string | null | undefined;
 	export let alternative: string | null | undefined;
@@ -59,11 +60,11 @@
 
 {#if replaceCount < maxReplaceCount}
 	<Tooltip
-		content={`${badge.time ? $locale().dateFormatter(databaseTimeToDate(badge.time)) : ''}${
-			badge.description ? `\n${badge.description}` : ''
-		}${badge.designer ? `\nDesigner: ${badge.designer}` : ''}${
-			badge.source ? `\nSource: ${badge.source}` : ''
-		}`}
+		content={`${dev ? `${badge.id}\n` : ''}${
+			badge.time ? $locale().dateFormatter(databaseTimeToDate(badge.time)) : ''
+		}${badge.description ? `\n${badge.description}` : ''}${
+			badge.designer ? `\nDesigner: ${badge.designer}` : ''
+		}${badge.source ? `\nSource: ${badge.source}` : ''}`}
 		id={`badge-${badge.id}`}
 		pin={`badge-${badge.id}`}
 		pinPosition="top"
-- 
cgit v1.2.3

