Skip to content

Commit

Permalink
add percent to display bar
Browse files Browse the repository at this point in the history
  • Loading branch information
birm committed Aug 8, 2023
1 parent d9c0b90 commit 322ab26
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions source/components/Eaglescope/Eaglescope.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,16 @@ function Eaglescope() {
// handle progress bar
useEffect(() => {
if (!data) return;
console.log(config)
if (filters.length > 0) {
setProgressAttrs({
now: filteredData.length,
label: `${filteredData.length}/${data.length}`,
label: `${filteredData.length}/${data.length}, ${Math.floor((filteredData.length/data.length)*100)}\%`,
});
} else {
setProgressAttrs({
now: data.length,
label: `${data.length}/${data.length}`,
label: `${data.length}/${data.length}, ${Math.floor((data.length/data.length)*100)}\%`,
});
}
}, [filters, filteredData]);
Expand Down

0 comments on commit 322ab26

Please sign in to comment.