umfangreiche Behebung von TS-Fehlern. "npm run types" läuft nun ohne Fehler durch

This commit is contained in:
Codex Agent
2025-11-21 07:45:21 +01:00
parent b6f6cdeffe
commit 07fe049b8a
25 changed files with 74 additions and 63 deletions

View File

@@ -28,7 +28,7 @@ export default function EventPhotosPage() {
const [photos, setPhotos] = React.useState<TenantPhoto[]>([]);
const [loading, setLoading] = React.useState(true);
const [error, setError] = React.useState<string | null>(null);
const [error, setError] = React.useState<string | undefined>(undefined);
const [busyId, setBusyId] = React.useState<number | null>(null);
const [limits, setLimits] = React.useState<EventLimitSummary | null>(null);
@@ -38,7 +38,7 @@ export default function EventPhotosPage() {
return;
}
setLoading(true);
setError(null);
setError(undefined);
try {
const result = await getEventPhotos(slug);
setPhotos(result.photos);
@@ -150,7 +150,7 @@ export default function EventPhotosPage() {
{photos.map((photo) => (
<div key={photo.id} className="rounded-2xl border border-white/80 bg-white/90 p-3 shadow-sm">
<div className="relative overflow-hidden rounded-xl">
<img src={photo.thumbnail_url || photo.url} alt={photo.original_name ?? 'Foto'} className="aspect-square w-full object-cover" />
<img src={photo.thumbnail_url ?? photo.url ?? undefined} alt={photo.original_name ?? 'Foto'} className="aspect-square w-full object-cover" />
{photo.is_featured && (
<span className="absolute left-3 top-3 rounded-full bg-pink-500/90 px-3 py-1 text-xs font-semibold text-white shadow">
Featured