From f4f009dc4a5e0143989ed8815e333e4b96b4b4fa Mon Sep 17 00:00:00 2001 From: MartinBraquet Date: Wed, 18 Feb 2026 20:08:32 +0100 Subject: [PATCH] Refactor UserLinkFromId component to enforce userId type and remove null checks --- web/components/events/event-card.tsx | 2 +- web/components/events/user-link.tsx | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/web/components/events/event-card.tsx b/web/components/events/event-card.tsx index ac7879f..33a28fb 100644 --- a/web/components/events/event-card.tsx +++ b/web/components/events/event-card.tsx @@ -107,7 +107,7 @@ export function EventCard(props: {

{event.participants.length > 0 && (
- {event.participants.map((participantId: any) => ( + {event.participants.map((participantId: string) => ( diff --git a/web/components/events/user-link.tsx b/web/components/events/user-link.tsx index 9da8ad2..536d9f9 100644 --- a/web/components/events/user-link.tsx +++ b/web/components/events/user-link.tsx @@ -32,10 +32,9 @@ export function UserLink({user, className = ""}: { } export function UserLinkFromId({userId, className = ""}: { - userId: string | null | undefined + userId: string className?: string }) { - if (!userId) return null const user = useUserInStore(userId) return }