Fixes up some non-null silliness

This commit is contained in:
2026-05-18 13:46:40 -05:00
parent 67fe81dc41
commit 53706b4035

View File

@@ -267,6 +267,7 @@
<!-- Photo lightbox -->
{#if expandedPhoto}
{@const photo = expandedPhoto}
<div
class="fixed inset-0 z-60 bg-black/90 flex flex-col"
role="dialog"
@@ -274,22 +275,22 @@
>
<div class="flex items-center justify-between px-4 py-3 shrink-0">
<div>
<p class="font-semibold text-white">{expandedPhoto.hunterName}</p>
<p class="text-xs text-white/40">{new Date(expandedPhoto.photoUploadDateTime).toLocaleString()}</p>
<p class="font-semibold text-white">{photo.hunterName}</p>
<p class="text-xs text-white/40">{new Date(photo.photoUploadDateTime).toLocaleString()}</p>
</div>
<div class="flex items-center gap-3">
<StatusBadge status={expandedPhoto.photoStatus} />
<StatusBadge status={photo.photoStatus} />
<button class="btn btn-ghost btn-sm btn-circle text-white" onclick={() => expandedPhoto = null}>✕</button>
</div>
</div>
<div class="flex-1 min-h-0 flex items-center justify-center px-4">
<AuthImage photoId={expandedPhoto.id} version="LARGE" alt={expandedPhoto.hunterName} class="max-h-full max-w-full object-contain rounded-lg" />
<AuthImage photoId={photo.id} version="LARGE" alt={photo.hunterName} class="max-h-full max-w-full object-contain rounded-lg" />
</div>
{#if expandedPhoto.photoStatus === 'SUBMITTED' || expandedPhoto.photoStatus === 'REJECTED'}
{#if photo.photoStatus === 'SUBMITTED' || photo.photoStatus === 'REJECTED'}
<div class="px-4 py-4 shrink-0">
<button class="btn btn-ghost btn-sm w-full text-white/40" onclick={() => { removePhoto(expandedPhoto!); expandedPhoto = null }}>
<button class="btn btn-ghost btn-sm w-full text-white/40" onclick={() => { removePhoto(photo); expandedPhoto = null }}>
Remove
</button>
</div>