Skip to content

Commit

Permalink
chore: fixed banner bug
Browse files Browse the repository at this point in the history
  • Loading branch information
jeafreezy committed Nov 19, 2024
1 parent 47535fb commit fe8553b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions frontend/src/components/ui/banner/banner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ const Banner = () => {
setIsBannerVisible(false);
};

if (!isBannerVisible || isError || data?.length === 0 || isLoading) {
return null;
}

const banner = useMemo(
() => (
<div className="w-full p-4 bg-primary flex items-center justify-between px-4 text-white">
Expand All @@ -46,10 +50,6 @@ const Banner = () => {
[data],
);

if (!isBannerVisible || isError || data?.length === 0 || isLoading) {
return null;
}

return banner;
};

Expand Down

0 comments on commit fe8553b

Please sign in to comment.