Seeder data Landing Page - Desa

This commit is contained in:
2026-01-12 14:03:44 +08:00
parent 503da91ce6
commit 903dc74cca
26 changed files with 1898 additions and 351 deletions

View File

@@ -50,9 +50,19 @@ function Apbdes() {
const dataAPBDes = state.findMany.data || []
const years = Array.from(new Set(dataAPBDes.map((item: any) => item.tahun)))
.sort((a, b) => b - a)
.map(year => ({ value: year.toString(), label: `Tahun ${year}` }))
const years = Array.from(
new Set(
dataAPBDes
.map((item: any) => item?.tahun)
.filter((tahun): tahun is number => typeof tahun === 'number')
)
)
.sort((a, b) => b - a)
.map(year => ({
value: year.toString(),
label: `Tahun ${year}`,
}))
useEffect(() => {
if (years.length > 0 && !selectedYear) {