summaryrefslogtreecommitdiff
path: root/src/lib/tempo
diff options
context:
space:
mode:
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>