diff --git a/src/components/historical-data/index.tsx b/src/components/historical-data/index.tsx
index ef455ed..9a62e31 100644
--- a/src/components/historical-data/index.tsx
+++ b/src/components/historical-data/index.tsx
@@ -35,6 +35,7 @@ import {
SelectTrigger,
SelectValue,
} from "../ui/select";
+import { Card, CardContent, CardHeader, CardTitle } from "../ui/card";
type RankData = {
id: number;
@@ -201,6 +202,58 @@ const App = ({
return p;
}
+ function renderHistoricalDataListV2() {
+ return (
+ data
+ .map((d, idx) => {
+ return (
+
+
+
+
+
+ {timestampToDate(new Date(d.createdAt).getTime(), true)}
+
+
+ {currency.symbol +
+ prettyNumberToLocaleString(
+ currencyWrapper(currency)(d.total)
+ )}
+
+
+
+
+
+
+
todo
+
+
0 ? "green" : "red",
+ }}
+ >
+ {idx < data.length - 1
+ ? getUpOrDown(d.total - data[idx + 1].total) +
+ currency.symbol +
+ prettyNumberToLocaleString(
+ currencyWrapper(currency)(
+ Math.abs(d.total - data[idx + 1].total)
+ )
+ )
+ : ""}
+
+
+
+
+
+ );
+ })
+ // TODO: slice first for better performance
+ .slice(dataPage * pageSize, (dataPage + 1) * pageSize)
+ );
+ }
+
function renderHistoricalDataList() {
// split data into pages
return (
@@ -460,6 +513,7 @@ const App = ({
+ {/*
{renderHistoricalDataListV2()}
*/}
{renderHistoricalDataList()}
);