website refactor
This commit is contained in:
@@ -4,11 +4,10 @@ import { useState } from 'react';
|
||||
import Button from '../ui/Button';
|
||||
import { useInject } from '@/lib/di/hooks/useInject';
|
||||
import { RACE_RESULTS_SERVICE_TOKEN } from '@/lib/di/tokens';
|
||||
import type { ImportResultRowDTO } from '@/lib/services/races/RaceResultsService';
|
||||
|
||||
interface ImportResultsFormProps {
|
||||
raceId: string;
|
||||
onSuccess: (results: ImportResultRowDTO[]) => void;
|
||||
onSuccess: (results: any[]) => void;
|
||||
onError: (error: string) => void;
|
||||
}
|
||||
|
||||
@@ -26,7 +25,7 @@ export default function ImportResultsForm({ raceId, onSuccess, onError }: Import
|
||||
|
||||
try {
|
||||
const content = await file.text();
|
||||
const results = raceResultsService.parseAndTransformCSV(content, raceId);
|
||||
const results = (raceResultsService as any).parseAndTransformCSV(content, raceId);
|
||||
onSuccess(results);
|
||||
} catch (err) {
|
||||
const errorMessage =
|
||||
|
||||
Reference in New Issue
Block a user