fix: update static year to dynamic

This commit is contained in:
hanif salafi 2026-01-02 06:31:50 +07:00
parent 1c01e472d8
commit 5eb07ba434
1 changed files with 3 additions and 2 deletions

View File

@ -27,7 +27,8 @@ const generateDummyData = () => {
for (let month = 1; month <= 7; month++) {
const userData = [];
const daysInMonth = getDaysInMonth(2025, month);
const year = new Date().getFullYear();
const daysInMonth = getDaysInMonth(year, month);
for (let day = 1; day <= daysInMonth; day++) {
// Buat 2-4 wilayah acak per hari
@ -45,7 +46,7 @@ const generateDummyData = () => {
}
dummy.push({
year: 2025,
year: year,
month,
user: userData,
});