diff --git a/src/App.jsx b/src/App.jsx index cfdfd15..06204c4 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -493,7 +493,6 @@ export default function App() { -
{/* SECTION 2 โ€” PROBLEM */} diff --git a/src/pages/Help.jsx b/src/pages/Help.jsx index 3427fea..879d410 100644 --- a/src/pages/Help.jsx +++ b/src/pages/Help.jsx @@ -3520,6 +3520,8 @@ export default function Help() { -
+
-
+
-
-
-
-
+
+
+
+
+
-
-
+
+
- ) + ); } export default function Ranking() { - useDocumentTitle('Ranking') - const [rows, setRows] = useState([]) - const [loading, setLoading] = useState(true) - const [period, setPeriod] = useState('All Time') + useDocumentTitle("Ranking"); + const [rows, setRows] = useState([]); + const [loading, setLoading] = useState(true); + const [period, setPeriod] = useState("All Time"); useEffect(() => { - let ignore = false + let ignore = false; async function load() { - setLoading(true) + setLoading(true); try { - const entries = await getRanking(50, period) - if (ignore) return + const entries = await getRanking(50, period); + if (ignore) return; const valid = Array.isArray(entries) ? entries.filter( (e) => e && - typeof e.responder === 'string' && + typeof e.responder === "string" && Number.isFinite(e.total_arrivals), ) - : [] + : []; const sorted = valid .sort((a, b) => b.total_arrivals - a.total_arrivals) - .slice(0, 20) - setRows(sorted) + .slice(0, 20); + setRows(sorted); } catch { - if (!ignore) setRows([]) + if (!ignore) setRows([]); } - if (!ignore) setLoading(false) + if (!ignore) setLoading(false); } - load() + load(); return () => { - ignore = true - } - }, [period]) + ignore = true; + }; + }, [period]); return ( -
+
{/* Nav */} -