diff --git a/apps/infoalloggi/src/components/tables/ricerca-table.tsx b/apps/infoalloggi/src/components/tables/ricerca-table.tsx index 85f5735..ac2bca8 100644 --- a/apps/infoalloggi/src/components/tables/ricerca-table.tsx +++ b/apps/infoalloggi/src/components/tables/ricerca-table.tsx @@ -1,3 +1,4 @@ +import { add } from "date-fns"; import { Building, ChevronDown, ChevronUp } from "lucide-react"; import { useState } from "react"; import { LoadingPage } from "~/components/loading"; @@ -33,20 +34,15 @@ export const TabRicerca = ({ ); } - const first_choice = data.findIndex((s) => !s.isInterrotto && s.isOkAcconto); - const second_choice = data.findIndex((s) => !s.isInterrotto); - const getDefaultOpen = (idx: number) => { - if (first_choice !== -1) return idx === first_choice; - if (second_choice !== -1) return idx === second_choice; - return idx === 0; - }; - return (