eslint fix

This commit is contained in:
Danel Kungla
2025-10-07 18:43:42 +03:00
parent f614759986
commit 17e7a98534
29 changed files with 34 additions and 217 deletions

View File

@@ -1,6 +1,6 @@
'use client';
import { useState } from 'react';
import { useMemo, useState } from 'react';
import { redirect } from 'next/navigation';
@@ -43,11 +43,13 @@ export default function TeamAccountStatistics({
accountBenefitStatistics,
expensesOverview,
}: TeamAccountStatisticsProps) {
const currentDate = new Date();
const [date, setDate] = useState<DateRange | undefined>({
from: new Date(currentDate.getFullYear(), currentDate.getMonth(), 1),
to: new Date(currentDate.getFullYear(), currentDate.getMonth() + 1, 0),
});
const date = useMemo<DateRange | undefined>(() => {
const currentDate = new Date();
return {
from: new Date(currentDate.getFullYear(), currentDate.getMonth(), 1),
to: new Date(currentDate.getFullYear(), currentDate.getMonth() + 1, 0),
};
}, []);
const {
i18n: { language },
} = useTranslation();