Fix moderation type errors

This commit is contained in:
gpt-engineer-app[bot]
2025-11-03 02:06:23 +00:00
parent 007494d21c
commit 9e02748067
8 changed files with 24 additions and 24 deletions

View File

@@ -12,11 +12,11 @@ interface ActivityCardProps {
entity_type?: string;
entity_name?: string;
timestamp: string;
moderator_id?: string;
moderator_id?: string | null;
moderator?: {
username: string;
display_name?: string;
avatar_url?: string;
display_name?: string | null;
avatar_url?: string | null;
};
};
}

View File

@@ -295,8 +295,8 @@ export function ItemEditDialog({ item, items, open, onOpenChange, onComplete }:
// Simple photo editing form for caption and credit
interface PhotoItem {
url: string;
caption?: string;
credit?: string;
caption?: string | null;
credit?: string | null;
}
function PhotoEditForm({

View File

@@ -24,7 +24,7 @@ import { logger } from '@/lib/logger';
interface Moderator {
user_id: string;
username: string;
display_name?: string;
display_name?: string | null;
role: string;
}

View File

@@ -15,11 +15,11 @@ interface ActivityItem {
entity_type?: string;
entity_name?: string;
timestamp: string;
moderator_id?: string;
moderator_id?: string | null;
moderator?: {
username: string;
display_name?: string;
avatar_url?: string;
display_name?: string | null;
avatar_url?: string | null;
};
}

View File

@@ -71,12 +71,12 @@ interface Report {
reported_entity_type: ReportEntityType;
reported_entity_id: string;
report_type: string;
reason: string;
reason: string | null;
status: string;
created_at: string;
reporter_profile?: {
username: string;
display_name?: string;
display_name?: string | null;
};
reported_content?: ReportedContent;
}

View File

@@ -277,9 +277,9 @@ export interface UserTopList {
id: string;
user_id: string;
title: string;
description?: string;
description?: string | null;
list_type: 'parks' | 'rides' | 'coasters' | 'companies' | 'mixed';
is_public: boolean;
is_public: boolean | null;
created_at: string;
updated_at: string;
items?: UserTopListItem[]; // New relational data
@@ -291,7 +291,7 @@ export interface UserTopListItem {
entity_type: 'park' | 'ride' | 'company';
entity_id: string;
position: number;
notes?: string;
notes?: string | null;
created_at: string;
updated_at: string;
// Populated via joins

View File

@@ -16,14 +16,14 @@ export interface PhotoSubmissionItem {
photo_submission_id: string;
cloudflare_image_id: string;
cloudflare_image_url: string;
caption?: string;
title?: string;
filename?: string;
caption?: string | null;
title?: string | null;
filename?: string | null;
order_index: number;
file_size?: number;
mime_type?: string;
date_taken?: string;
date_taken_precision?: string;
file_size?: number | null;
mime_type?: string | null;
date_taken?: string | null;
date_taken_precision?: string | null;
created_at: string;
}

View File

@@ -12,11 +12,11 @@ export interface PhotoItem {
id: string;
url: string;
filename: string;
caption?: string;
caption?: string | null;
size?: number;
type?: string;
title?: string;
date_taken?: string;
title?: string | null;
date_taken?: string | null;
}
// Normalized photo for consistent display