summaryrefslogtreecommitdiff
path: root/src/lib/tempo
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2025-01-11 09:27:46 +0700
committerit-fixcomart <it@fixcomart.co.id>2025-01-11 09:27:46 +0700
commit40f762589601de0fe1d5b06164b2553ebdbf5ecd (patch)
treeb5d341a472ef37a00e5a87e0877e9874b0ca5490 /src/lib/tempo
parentfedaceac3e41741c198c94fd20917c9572fa7ec1 (diff)
<iman> update code
Diffstat (limited to 'src/lib/tempo')
-rw-r--r--src/lib/tempo/components/Tempo.jsx7
1 files changed, 5 insertions, 2 deletions
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>