diff --git a/frontend/src/components/ui/banner/banner.tsx b/frontend/src/components/ui/banner/banner.tsx index 88ddaddd..031845b9 100644 --- a/frontend/src/components/ui/banner/banner.tsx +++ b/frontend/src/components/ui/banner/banner.tsx @@ -27,6 +27,10 @@ const Banner = () => { setIsBannerVisible(false); }; + if (!isBannerVisible || isError || data?.length === 0 || isLoading) { + return null; + } + const banner = useMemo( () => (
@@ -46,10 +50,6 @@ const Banner = () => { [data], ); - if (!isBannerVisible || isError || data?.length === 0 || isLoading) { - return null; - } - return banner; };