From 15f52f55955d56989b7b6039c04c0df427ff1bde Mon Sep 17 00:00:00 2001
From: Fuwn <contact@fuwn.me>
Date: Thu, 18 Apr 2024 18:38:14 -0700
Subject: feat(badges): badge preview pane

---
 src/lib/FallbackBadge.svelte | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

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

diff --git a/src/lib/FallbackBadge.svelte b/src/lib/FallbackBadge.svelte
index 323ea791..c4604263 100644
--- a/src/lib/FallbackBadge.svelte
+++ b/src/lib/FallbackBadge.svelte
@@ -13,6 +13,7 @@
 	export let hideOnError = false;
 	export let badge: Badge;
 	export let style = '';
+	export let selectedBadge: Badge | null = null;
 
 	let replaceCount = 0;
 	let badgeReference: HTMLImageElement;
@@ -56,7 +57,16 @@
 		pin={`badge-${badge.id}`}
 		pinPosition="top"
 	>
-		<a href={badge.post} target="_blank" class="badge-container badge">
+		<a
+			href={'#'}
+			target="_blank"
+			class="badge-container badge"
+			on:click={(e) => {
+				e.preventDefault();
+
+				selectedBadge = badge;
+			}}
+		>
 			<img
 				src={source}
 				alt={alternative}
-- 
cgit v1.2.3

