diff --git a/src/pages/dashboard/DashboardPage.tsx b/src/pages/dashboard/DashboardPage.tsx index 03e5549..f8b4c78 100644 --- a/src/pages/dashboard/DashboardPage.tsx +++ b/src/pages/dashboard/DashboardPage.tsx @@ -3,7 +3,7 @@ import "react-tiles-dnd/esm/index.css"; import { TilesContainer, RenderTileFunction } from "react-tiles-dnd"; import useWindowDimensions from "../../hooks/WindowDimensionsHook.tsx"; import {Header} from "../../components/Header.tsx"; -import React, {ReactNode, useEffect, useState} from "react"; +import {ReactNode, useEffect, useState} from "react"; import { getTransactionsFilterOrderBy, Transaction } from "../../utils/transaction.ts" import {auth} from "../../utils/firebase.ts"; import {orderBy} from "firebase/firestore"; diff --git a/src/pages/dashboard/GraphUtils.ts b/src/pages/dashboard/GraphUtils.ts index 301cc3c..266777c 100644 --- a/src/pages/dashboard/GraphUtils.ts +++ b/src/pages/dashboard/GraphUtils.ts @@ -2,13 +2,14 @@ import {Transaction} from "../../utils/transaction.ts"; type transactionPoint = { date: string; amount: number } -const cumulateTransactions = (points: transactionPoint[]): transactionPoint[] => { - let total = 0; - return points.map(value => { - total += value.amount; - return {date: value.date, amount: total}; - }) -} +// const cumulateTransactions = (points: transactionPoint[]): transactionPoint[] => { +// let total = 0; +// return points.map(value => { +// total += value.amount; +// return {date: value.date, amount: total}; +// }) +// } + const getDateString = (timestamp: number): string => { const date = new Date(timestamp) const day = date.getDate().toString().padStart(2, '0'); // Ensures two digits