+ e.key === 'Enter' || e.key === ' ' ? (e.preventDefault(), onViewProfile()) : null}
>
{#if tag}
{tag}
{/if}
- {#if image && !imageError}
-

- {:else}
-
- {getInitials(name)}
-
- {/if}
-
-
-
- {name}
-
-
{position}
-
-
+
+
+
+
diff --git a/src/components/council/CouncilCardPopUp.svelte b/src/components/council/CouncilCardPopUp.svelte
index 93c4e7a..c721e81 100644
--- a/src/components/council/CouncilCardPopUp.svelte
+++ b/src/components/council/CouncilCardPopUp.svelte
@@ -9,8 +9,13 @@
onClose,
id = 'popup-title'
} = $props();
- import { getInitials } from '$lib/format';
import { Mail, X } from '@lucide/svelte';
+
+ function getInitials(name: string | null | undefined): string {
+ if (name == null || typeof name !== 'string') return '';
+ const words = name.trim().split(/\s+/).filter(Boolean);
+ return words.slice(0, 3).map((w) => w.charAt(0).toUpperCase()).join('');
+ }
import { scale } from 'svelte/transition';
let imageError = $state(false);
diff --git a/src/lib/format.ts b/src/lib/format.ts
deleted file mode 100644
index 78139bb..0000000
--- a/src/lib/format.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-/**
- * Get initials from a name (e.g. "Jane Doe" → "JD", "Mary Jane Watson" → "MJW").
- * Uses first letter of up to 3 words. Safe for null/undefined/empty.
- */
-export function getInitials(name: string | null | undefined): string {
- if (name == null || typeof name !== 'string') return '';
- const words = name.trim().split(/\s+/).filter(Boolean);
- if (words.length === 0) return '';
- return words
- .slice(0, 3)
- .map((w) => w.charAt(0).toUpperCase())
- .join('');
-}