From 40f762589601de0fe1d5b06164b2553ebdbf5ecd Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Sat, 11 Jan 2025 09:27:46 +0700
Subject: <iman> update code

---
 src/lib/tempo/components/Tempo.jsx | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

(limited to 'src/lib/tempo/components/Tempo.jsx')

diff --git a/src/lib/tempo/components/Tempo.jsx b/src/lib/tempo/components/Tempo.jsx
index 3af5b56c..c246f3d8 100644
--- a/src/lib/tempo/components/Tempo.jsx
+++ b/src/lib/tempo/components/Tempo.jsx
@@ -33,7 +33,7 @@ import { InfoIcon } from 'lucide-react';
 const Tempo = () => {
   const auth = getAuth();
   const router = useRouter();
-  const { q = '', page = 1, limit = 15, status = 0 } = router.query;
+  const { q = '', page = 1, limit = 15, status = '' } = router.query;
   const { isDesktop, isMobile } = useDevice();
   const [pageNew, setPageNew] = useState(page);
   const [limitNew, setLimitNew] = useState(limit);
@@ -282,7 +282,7 @@ const Tempo = () => {
                       </select>
                       <select
                         id='statusSelect'
-                        value={statusNew}
+                        value={statusNew ?? ''} // Gunakan nullish coalescing untuk default value
                         onChange={(e) => {
                           setStatusNew(Number(e.target.value));
                           if (e.target.value == 0) {
@@ -293,6 +293,9 @@ const Tempo = () => {
                         }}
                         className='border p-2'
                       >
+                        <option value='' disabled hidden>
+                          Status
+                        </option>
                         <option value={0}>All</option>
                         <option value={1}>Jatuh Tempo</option>
                         <option value={2}>Belum Jatuh Tempo</option>
-- 
cgit v1.2.3

