From bb79368b2d11490c79b459796bd10a855cd8fc32 Mon Sep 17 00:00:00 2001 From: spandev <143828642+Spandan-Mishra@users.noreply.github.com> Date: Sat, 25 Oct 2025 21:02:44 +0530 Subject: [PATCH] fix: empty event types page doesn't show no more results anymore (#24655) * fix: empty event types page doesn't show no more results anymore * update: conditional rendering of results button --------- Co-authored-by: Volnei Munhoz --- .../views/event-types-listing-view.tsx | 25 +++++++++++-------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/apps/web/modules/event-types/views/event-types-listing-view.tsx b/apps/web/modules/event-types/views/event-types-listing-view.tsx index c57aebf234..029365fb17 100644 --- a/apps/web/modules/event-types/views/event-types-listing-view.tsx +++ b/apps/web/modules/event-types/views/event-types-listing-view.tsx @@ -144,15 +144,17 @@ const InfiniteTeamsTab: FC = (props) => { debouncedSearchTerm={debouncedSearchTerm} /> )} -
- -
+ {(query.data?.pages?.[0]?.eventTypes?.length ?? 0) > 0 && ( +
+ +
+ )} ); }; @@ -998,8 +1000,9 @@ const EventTypesPage = ({ userEventGroupsData, user }: Props) => { */ const redirectUrl = localStorage.getItem("onBoardingRedirect"); localStorage.removeItem("onBoardingRedirect"); - redirectUrl && router.push(redirectUrl); - // eslint-disable-next-line react-hooks/exhaustive-deps + if (redirectUrl) { + router.push(redirectUrl); + } }, []); useEffect(() => {