From 7015514ab1a41d03581f6ac18ceed84c5ec886c0 Mon Sep 17 00:00:00 2001 From: Andrei Kuchuk Date: Thu, 4 Jul 2024 10:13:32 +0400 Subject: [PATCH] [#188] fix event download action in prevew-card --- src/shared/lib/io/use-events-requests.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; })