diff --git a/frontend/sportsmatch-app/src/pages/Index.tsx b/frontend/sportsmatch-app/src/pages/Index.tsx index 1bb7f56d..3e62f29a 100644 --- a/frontend/sportsmatch-app/src/pages/Index.tsx +++ b/frontend/sportsmatch-app/src/pages/Index.tsx @@ -11,7 +11,6 @@ import { EventsControllerService, ExSecuredEndpointService, OpenAPI, - RequestEventDTO, SportDTO, } from '../generated/api' import useModal from '../hooks/UseModal' @@ -52,14 +51,13 @@ export default function MainPage() { useEffect(() => { const fetchData = async () => { - OpenAPI.TOKEN = localStorage.getItem('token')! try { - const requestEventDTO: RequestEventDTO = { - sportsName: selectedSports, - } const response = await EventsControllerService.getNearbyEvents( - requestEventDTO, - {}, + selectedSports, + 0, + 0, + 0, + 5, ) if (!Array.isArray(response)) { throw new Error('Failed to fetch event data')