Fixed summary query.

This commit is contained in:
Mike Cao 2020-07-30 00:06:29 -07:00
parent 0c8d9eacd3
commit 344ffeb658
6 changed files with 16 additions and 7 deletions

View file

@ -15,7 +15,7 @@ export default function PageviewsChart({ data, unit }) {
switch (unit) {
case 'day':
if (n > 7) {
return index % (n / 15) === 0 ? format(d, 'MMM d') : '';
return index % ~~(n / 15) === 0 ? format(d, 'MMM d') : '';
}
return format(d, 'EEE M/d');
default: