mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-29 22:27:09 -05:00
Fix critical 'any' types in components
This commit is contained in:
@@ -100,6 +100,14 @@ export function EntityTimelineManager({
|
||||
setIsDialogOpen(true);
|
||||
};
|
||||
|
||||
// Convert TimelineEvent to the format expected by the dialog
|
||||
const editingEventForDialog = editingEvent ? {
|
||||
...editingEvent,
|
||||
event_date: new Date(editingEvent.event_date),
|
||||
id: editingEvent.id,
|
||||
approved_by: editingEvent.approved_by || null,
|
||||
} : undefined;
|
||||
|
||||
// Handle delete
|
||||
const handleDelete = async (eventId: string) => {
|
||||
if (!user) {
|
||||
@@ -211,7 +219,7 @@ export function EntityTimelineManager({
|
||||
entityType={entityType}
|
||||
entityId={entityId}
|
||||
entityName={entityName}
|
||||
existingEvent={editingEvent}
|
||||
existingEvent={editingEventForDialog}
|
||||
onSuccess={handleSuccess}
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -93,7 +93,7 @@ interface TimelineEventEditorDialogProps {
|
||||
entityType: EntityType;
|
||||
entityId: string;
|
||||
entityName: string;
|
||||
existingEvent?: any;
|
||||
existingEvent?: TimelineEventFormData & { id: string; approved_by?: string | null };
|
||||
onSuccess?: () => void;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user