diff --git a/src/shared/lib/io/use-events-requests.ts b/src/shared/lib/io/use-events-requests.ts index de63c3c6..b20e3ae3 100644 --- a/src/shared/lib/io/use-events-requests.ts +++ b/src/shared/lib/io/use-events-requests.ts @@ -41,8 +41,8 @@ export const useEventsRequests: TUseEventsRequests = () => { const getSingle = (id: EventId) => fetch(getEventRestUrl(id), {headers}) .then((response) => response.json()) .then((response) => { - if (response?.data) { - return response.data as ServerEvent + if (response) { + return response as ServerEvent } return null; })