refactor(FE): Remove unused imports and redundant code

This commit is contained in:
rstubryan
2026-02-20 14:17:26 +07:00
parent de0f9ae985
commit 1f2f3acebb
90 changed files with 222 additions and 474 deletions
@@ -16,12 +16,7 @@ import {
SelectValue,
} from '@/figma-make/components/base/select';
import { Badge } from '@/figma-make/components/base/badge';
import {
Calendar as CalendarIcon,
Users,
AlertCircle,
Info,
} from 'lucide-react';
import { Users, AlertCircle, Info } from 'lucide-react';
import { DateRangePicker } from '@/figma-make/components/base/date-range-picker';
import {
BarChart,
@@ -71,11 +66,7 @@ export function Dashboard() {
const [kandangFilter, setKandangFilter] = useState('ALL');
const [categoryFilter, setCategoryFilter] = useState('ALL');
const {
data: summaryResponse,
isLoading: isLoadingSummary,
mutate: refreshSummary,
} = useSWR<
const { data: summaryResponse, isLoading: isLoadingSummary } = useSWR<
BaseApiResponse<DailyChecklistSummary | undefined>,
AxiosError<BaseApiResponse>,
SWRHttpKey
@@ -86,11 +77,16 @@ export function Dashboard() {
httpClientFetcher
);
const { options: kandangOptions, isLoadingOptions: isLoadingKandangs } =
useSelect(KandangApi.basePath, 'id', 'name', 'search', {
const { options: kandangOptions } = useSelect(
KandangApi.basePath,
'id',
'name',
'search',
{
page: '1',
limit: '100',
});
}
);
const kandangColorMap: { [key: string]: string } = {};
(kandangOptions || []).forEach((k, index) => {