From 8840ef043fbd538be9fa2023b1f9ae0aac40ef46 Mon Sep 17 00:00:00 2001 From: Haoyu Xu Date: Thu, 19 Dec 2024 15:27:09 +0800 Subject: [PATCH] fix: fixed incorrectly displaying new update entries --- directory/src/routes/path/Home.jsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/directory/src/routes/path/Home.jsx b/directory/src/routes/path/Home.jsx index bc2952f..7e3ca16 100644 --- a/directory/src/routes/path/Home.jsx +++ b/directory/src/routes/path/Home.jsx @@ -174,10 +174,11 @@ export default function Home() {
{officalUpdate.length - operators.length} {i18n("new_op_wait_to_update")}
- {officalUpdate[officalUpdate.dates[0]].map((entry, index) => { - if (index >= officalUpdate.length - operators.length) { - return null - } + {officalUpdate.dates.reduce((acc, cur) => { + const op = officalUpdate[cur]; + return [...acc, ...op]; + }, []).slice(0, officalUpdate.length - operators.length) + .map((entry, index) => { return (