Skip to content

Commit

Permalink
fix double banner bug
Browse files Browse the repository at this point in the history
  • Loading branch information
brandon-pereira committed Nov 18, 2023
1 parent ef38a9e commit 1830f5b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/containers/Body/AllCaughtUp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const ReactCanvasConfetti = styled(BaseReactCanvasConfetti)`

export default function AllCaughtUpBanner() {
const currentListId = useCurrentListId();
const { list } = useListDetails(currentListId);
const { error, list } = useListDetails(currentListId);
const prevTaskLength = useRef(list?.tasks?.length || 0);
const prevListId = useRef(list?._id);
const [triggerFire, setState] = useState(0);
Expand All @@ -49,7 +49,7 @@ export default function AllCaughtUpBanner() {
prevTaskLength.current = list?.tasks?.length || 0;
}, [list]);

if (list.tasks?.length !== 0) {
if (list.tasks?.length !== 0 || error) {
return null;
}

Expand Down

0 comments on commit 1830f5b

Please sign in to comment.