Skip to content

Commit

Permalink
Merge pull request #351 from usefathom/add-zeropadding-to-table
Browse files Browse the repository at this point in the history
Add zero padding to the widthClass generation
  • Loading branch information
LKaemmerling authored May 2, 2022
2 parents 0a3ffdb + a20da22 commit 940f020
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion assets/src/js/components/Table.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class Table extends Component {
let href = (p.Hostname + p.Pathname) || p.URL;
let widthClass = "";
if(state.total > 0) {
widthClass = "w" + Math.min(98, Math.round(p.Pageviews / state.total * 100 * 2.5));
widthClass = "w" + ("" + Math.min(98, Math.round(p.Pageviews / state.total * 100 * 2.5))).padStart(2, '0');
}

let label = p.Pathname
Expand Down

0 comments on commit 940f020

Please sign in to comment.