From 55d24c5faf9b6b350a527100397c340c5b9234b1 Mon Sep 17 00:00:00 2001 From: TZGyn Date: Tue, 7 Jan 2025 20:11:48 +0800 Subject: [PATCH] fix cache + liniting issue --- app/page.tsx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/app/page.tsx b/app/page.tsx index 6b87424..69e1a47 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -9,16 +9,17 @@ import { CardContent, CardFooter, CardHeader, - CardTitle, } from "@/components/ui/card"; +export const dynamic = "force-dynamic"; + export default async function Home() { const file = await fs.promises.readFile("./output.txt"); const lines = file.toString().split("\n"); const data = lines.map((line) => { - const [timestamp, _, value] = line.split(","); + const [timestamp, , value] = line.split(","); return { timestamp: Math.round(parseFloat(timestamp) * 1000), foldtime: parseFloat(value), @@ -35,7 +36,7 @@ export default async function Home() {
This Month

- {thisMonthData.reduce((acc, curr) => { + {thisMonthData.reduce((acc) => { return acc + 1; }, 0)} {" Towel(s)"} @@ -50,7 +51,7 @@ export default async function Home() {
Today

- {todayData.reduce((acc, curr) => { + {todayData.reduce((acc) => { return acc + 1; }, 0)} {" Towel(s)"} @@ -65,7 +66,7 @@ export default async function Home() {
This Month

- {thisMonthData.reduce((acc, curr) => { + {thisMonthData.reduce((acc) => { return acc + 1; }, 0)} {" Towel(s)"}