typescript-typenfehler behoben.. npm run lint läuft nun fehlerfrei durch.
This commit is contained in:
@@ -6,10 +6,9 @@ import { Separator } from '@/components/ui/separator';
|
||||
import EmotionPicker from '../components/EmotionPicker';
|
||||
import GalleryPreview from '../components/GalleryPreview';
|
||||
import { useGuestIdentity } from '../context/GuestIdentityContext';
|
||||
import { useEventStats } from '../context/EventStatsContext';
|
||||
import { useEventData } from '../hooks/useEventData';
|
||||
import { useGuestTaskProgress } from '../hooks/useGuestTaskProgress';
|
||||
import { Sparkles, UploadCloud, X, Camera, RefreshCw } from 'lucide-react';
|
||||
import { Sparkles, UploadCloud, X, RefreshCw } from 'lucide-react';
|
||||
import { useTranslation, type TranslateFn } from '../i18n/useTranslation';
|
||||
import { useEventBranding } from '../context/EventBrandingContext';
|
||||
import type { EventBranding } from '../types/event-branding';
|
||||
@@ -17,7 +16,6 @@ import type { EventBranding } from '../types/event-branding';
|
||||
export default function HomePage() {
|
||||
const { token } = useParams<{ token: string }>();
|
||||
const { name, hydrated } = useGuestIdentity();
|
||||
const stats = useEventStats();
|
||||
const { event } = useEventData();
|
||||
const { completedCount } = useGuestTaskProgress(token ?? '');
|
||||
const { t, locale } = useTranslation();
|
||||
@@ -100,10 +98,10 @@ export default function HomePage() {
|
||||
const payload = await response.json();
|
||||
if (cancelled) return;
|
||||
if (Array.isArray(payload) && payload.length) {
|
||||
missionPoolRef.current = payload.map((task: any) => ({
|
||||
missionPoolRef.current = payload.map((task: Record<string, unknown>) => ({
|
||||
id: Number(task.id),
|
||||
title: task.title ?? 'Mission',
|
||||
description: task.description ?? '',
|
||||
title: typeof task.title === 'string' ? task.title : 'Mission',
|
||||
description: typeof task.description === 'string' ? task.description : '',
|
||||
duration: typeof task.duration === 'number' ? task.duration : 3,
|
||||
emotion: task.emotion ?? null,
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user