From 1526b50fd2044ca2df035c6f0a41eaab0e3c56c2 Mon Sep 17 00:00:00 2001 From: Shemy Gan Date: Thu, 24 Oct 2024 14:40:04 -0400 Subject: [PATCH] - update unitItems with lookup --- Client/src/Pages/AdvancedSettings/index.jsx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Client/src/Pages/AdvancedSettings/index.jsx b/Client/src/Pages/AdvancedSettings/index.jsx index 853817544..3f04653cb 100644 --- a/Client/src/Pages/AdvancedSettings/index.jsx +++ b/Client/src/Pages/AdvancedSettings/index.jsx @@ -81,15 +81,14 @@ const AdvancedSettings = ({ isAdmin }) => { warn: 4, }; - const unitItems = [ - { _id: "d", name: "days" }, - { _id: "h", name: "hours" } - ]; - const unitItemLookup = { days: "d", hours: "h", }; + const unitItems = Object.keys(unitItemLookup).map((key) => ({ + _id: unitItemLookup[key], + name: key, + })); const handleLogLevel = (e) => { const id = e.target.value;