diff --git a/frontend/app/root.tsx b/frontend/app/root.tsx index 0c8b441..60de66c 100644 --- a/frontend/app/root.tsx +++ b/frontend/app/root.tsx @@ -45,7 +45,9 @@ const statsReducer = (state: any, action: any) => { if (action.update) state.update += action.update; if (action.delete) state.delete += action.delete; if (action.insert) state.insert += action.insert; - if (action.log) state.log.push({ ...action.log }); + // we want new logs to be at the top of the list + if (action.log) state.log.unshift({ ...action.log }); + return state; }; diff --git a/frontend/app/routes/dash.tsx b/frontend/app/routes/dash.tsx index 0f53e57..9b2e0a8 100644 --- a/frontend/app/routes/dash.tsx +++ b/frontend/app/routes/dash.tsx @@ -1,6 +1,6 @@ import { useEffect, useState } from "react"; import { useStats } from "~/components/StatsContext"; -import { SQLRequestEvent } from "worker/lib/tools"; +import type { SQLRequestEvent } from "worker/lib/tools"; interface Status { cf: