diff --git a/FRONTEND/src/components/ModalHistory.tsx b/FRONTEND/src/components/ModalHistory.tsx
index 8b2faf5..f49a23e 100644
--- a/FRONTEND/src/components/ModalHistory.tsx
+++ b/FRONTEND/src/components/ModalHistory.tsx
@@ -35,11 +35,12 @@ interface ModalHistoryProps {
}
const TIME_PERIODS = [
- { label: "Current", value: "current" },
+ { label: "Latest", value: "current" },
{ label: "last 4h", value: "last_4h" },
{ label: "last 8h", value: "last_8h" },
{ label: "last 24h", value: "last_24h" },
{ label: "last 48h", value: "last_48h" },
+ { label: "last 72h", value: "last_72h" },
];
function ModalHistory({
@@ -125,6 +126,9 @@ function ModalHistory({
case "last_48h":
// Last 48h: tất cả data (từ đầu đến giờ)
return [now - 48 * HOUR, now];
+ case "last_72h":
+ // Last 72h: dữ liệu trong 72h gần nhất
+ return [now - 72 * HOUR, now];
default:
return [0, now];
}
@@ -380,7 +384,7 @@ function ModalHistory({
{/* Các items trong nhóm */}
{items
- ?.filter((el, i) =>
+ ?.filter((_, i) =>
activeTimePeriod === "current"
? i === 0
: true
@@ -450,7 +454,7 @@ function ModalHistory({
))}
{/* Spacer để đảm bảo có thể scroll ngay cả khi content ít */}
-
+
>
) : (