Skip to content

Commit

Permalink
Add useEffect to component UpToDateStatus
Browse files Browse the repository at this point in the history
  • Loading branch information
lucianogorza committed Sep 20, 2023
1 parent f74b3b0 commit 80caf8d
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,8 @@ export const UpToDateStatus = ({ setCurrentUpdate }: UpToDateStatusProps) => {
const currentUpdate = getCurrentAvailableUpdate(availableUpdates);

useEffect(() => {
if (!availableUpdates) {
return;
}
setCurrentUpdate(currentUpdate);
}, [availableUpdates]);
}, [currentUpdate]);

const isUpToDate = !currentUpdate;

Expand Down

0 comments on commit 80caf8d

Please sign in to comment.