infoalloggi-monorepo/apps/infoalloggi/src/components/annunci_grid.tsx
Marco Pedone 8fe0b6636d Refactor TypeScript schemas and enums for consistency and readability
- Updated enum definitions in PaymentStatusEnum and TipologiaPosizioneEnum to use single quotes and consistent formatting.
- Refactored Payments, Prezziario, Ratelimiter, Servizio, and other schema files to ensure consistent indentation and formatting.
- Added `updated_at` field to various queries in interests and servizio controllers.
- Removed unused imageCache utility file.
2025-10-21 18:42:03 +02:00

36 lines
1.2 KiB
TypeScript

import { CardAnnuncio } from "~/components/annuncio_card";
import { getTitoloTranslation } from "~/lib/annuncio_details";
import { useTranslation } from "~/providers/I18nProvider";
import type { AnnuncioRicerca } from "~/server/controllers/annunci.controller";
export const AnnunciGrid = ({ pagedata }: { pagedata: AnnuncioRicerca[] }) => {
const { locale } = useTranslation();
return (
<div className="relative z-0 mx-auto grid max-w-7xl grid-flow-row grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3">
{pagedata.map((annuncio) => (
<CardAnnuncio
camere={annuncio.numero_camere}
codice={annuncio.codice}
comune={annuncio.comune}
consegna={annuncio.consegna}
id={annuncio.id}
immagini={annuncio.url_immagini || undefined}
key={annuncio.codice}
mq={annuncio.mq}
prezzo={annuncio.prezzo}
provincia={annuncio.provincia}
stato={annuncio.stato}
tipo={annuncio.tipo}
titolo={getTitoloTranslation({
locale: locale,
titolo_en: annuncio.titolo_en,
titolo_it: annuncio.titolo_it,
})}
updated_at={annuncio.updated_at}
videos={annuncio.url_video || undefined}
/>
))}
</div>
);
};