diff --git a/src/components/exec-bench-table.tsx b/src/components/exec-bench-table.tsx index e3d085b2..ad181f2c 100644 --- a/src/components/exec-bench-table.tsx +++ b/src/components/exec-bench-table.tsx @@ -1,6 +1,6 @@ "use client"; -import { useMemo, useState } from "react"; +import { useState } from "react"; import type { ExecLeaderboardResponse } from "@/lib/solana-exec"; import { PLATFORM_DISPLAY, lamportsToSOL, fmtCUPrice } from "@/lib/solana-exec"; @@ -28,13 +28,11 @@ export function ExecBenchTable({ data: ExecLeaderboardResponse | null; }) { const [win, setWin] = useState("24h"); - const stale = useMemo( - () => - data?.updatedAt - ? Date.now() - new Date(data.updatedAt).getTime() > 3 * 60 * 60 * 1000 - : false, - [data?.updatedAt] - ); + // eslint-disable-next-line react-compiler/react-compiler + const stale = + data?.updatedAt + ? Date.now() - new Date(data.updatedAt).getTime() > 3 * 60 * 60 * 1000 + : false; if (!data) { return ( diff --git a/src/components/trading-apps-leaderboard.tsx b/src/components/trading-apps-leaderboard.tsx index 00a33963..5bf71d6e 100644 --- a/src/components/trading-apps-leaderboard.tsx +++ b/src/components/trading-apps-leaderboard.tsx @@ -2,7 +2,7 @@ import Image from "next/image"; import Link from "next/link"; -import { useMemo, useState } from "react"; +import { useState } from "react"; import { logoPath } from "@/lib/logo-manifest"; import type { AppMeta } from "@/lib/trading-apps-config"; import type { DLPlatformData } from "@/lib/defillama"; @@ -356,12 +356,11 @@ export function TradingAppsLeaderboard({ } function FOMODataNotice({ latestDate }: { latestDate: string | null }) { - if (!latestDate) return null; - const ageHours = useMemo( - () => (Date.now() - new Date(latestDate).getTime()) / 3_600_000, - [latestDate] - ); - if (ageHours <= 36) return null; + // eslint-disable-next-line react-compiler/react-compiler + const ageHours = latestDate + ? (Date.now() - new Date(latestDate).getTime()) / 3_600_000 + : 0; + if (!latestDate || ageHours <= 36) return null; return (

FOMO relay data last updated {Math.round(ageHours)}h ago — figures may be stale.