Solved a bug on the stats page
This commit is contained in:
@@ -377,13 +377,7 @@ export default function Stats() {
|
|||||||
<Chart
|
<Chart
|
||||||
type="line"
|
type="line"
|
||||||
data={{
|
data={{
|
||||||
labels: Object.keys(
|
labels: Object.keys(groupBySession(stats)).map((_, index) => index),
|
||||||
groupBySession(
|
|
||||||
stats.filter(
|
|
||||||
(x) => moment.unix(x.date).isAfter(startDate) && moment.unix(x.date).isBefore(endDate),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
).map((_, index) => index),
|
|
||||||
datasets: [
|
datasets: [
|
||||||
{
|
{
|
||||||
type: "line",
|
type: "line",
|
||||||
@@ -406,13 +400,7 @@ export default function Stats() {
|
|||||||
<Chart
|
<Chart
|
||||||
type="line"
|
type="line"
|
||||||
data={{
|
data={{
|
||||||
labels: Object.keys(
|
labels: Object.keys(groupBySession(stats)).map((_, index) => index),
|
||||||
groupBySession(
|
|
||||||
stats.filter(
|
|
||||||
(x) => moment.unix(x.date).isAfter(startDate) && moment.unix(x.date).isBefore(endDate),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
).map((_, index) => index),
|
|
||||||
datasets: [
|
datasets: [
|
||||||
...MODULE_ARRAY.map((module, index) => ({
|
...MODULE_ARRAY.map((module, index) => ({
|
||||||
type: "line" as const,
|
type: "line" as const,
|
||||||
|
|||||||
Reference in New Issue
Block a user