diff --git a/apps/infoalloggi/src/components/annunci_grid.tsx b/apps/infoalloggi/src/components/annunci_grid.tsx index 825445a..65914aa 100644 --- a/apps/infoalloggi/src/components/annunci_grid.tsx +++ b/apps/infoalloggi/src/components/annunci_grid.tsx @@ -27,6 +27,7 @@ export const AnnunciGrid = ({ pagedata }: { pagedata: AnnuncioRicerca[] }) => { titolo_en: annuncio.titolo_en, titolo_it: annuncio.titolo_it, })} + videos={annuncio.url_video || undefined} /> ))} diff --git a/apps/infoalloggi/src/components/annuncio_card.tsx b/apps/infoalloggi/src/components/annuncio_card.tsx index db7a4f4..b20c346 100644 --- a/apps/infoalloggi/src/components/annuncio_card.tsx +++ b/apps/infoalloggi/src/components/annuncio_card.tsx @@ -36,6 +36,7 @@ type CardAnnuncioProps = { tipo: string | null; stato: string | null; className?: string; + videos?: string[] | undefined; }; export const CardAnnuncio = ({ @@ -52,13 +53,14 @@ export const CardAnnuncio = ({ tipo, stato, className, + videos, }: CardAnnuncioProps) => { const { t } = useTranslation(); return (
-
+
{stato === "Trattativa" && (
-
+
Annuncio in Trattativa
@@ -86,7 +88,7 @@ export const CardAnnuncio = ({ ))} + {videos?.map((video, idx) => { + if (!video) return null; + if (video.includes("youtu")) { + return null; + } + return ( + { + e.preventDefault(); + e.stopPropagation(); + }} + > + + + ); + })}
{ -
-
-
- {t.annunci.titolo} -
-
+
+
+ {t.annunci.titolo} +
{ ); return ( -
+
diff --git a/apps/infoalloggi/src/pages/chi-siamo.tsx b/apps/infoalloggi/src/pages/chi-siamo.tsx index 3b9c42e..20802d2 100644 --- a/apps/infoalloggi/src/pages/chi-siamo.tsx +++ b/apps/infoalloggi/src/pages/chi-siamo.tsx @@ -11,11 +11,11 @@ const ChiSiamo: NextPage = () => { {t.heads.chi_siamo_titolo} -
-
+
+
{t.chi_siamo.title}
-
+
{ {t.heads.contatti_titolo} -
-
+
+
{t.contatti}
diff --git a/apps/infoalloggi/src/pages/guida.tsx b/apps/infoalloggi/src/pages/guida.tsx index bc931bf..f82a82a 100644 --- a/apps/infoalloggi/src/pages/guida.tsx +++ b/apps/infoalloggi/src/pages/guida.tsx @@ -19,8 +19,8 @@ const Guida: NextPage = () => { {t.heads.guida_titolo} -
-
+
+
{t.guida}
diff --git a/apps/infoalloggi/src/pages/prezzi.tsx b/apps/infoalloggi/src/pages/prezzi.tsx index ec9e5d2..1cadab8 100644 --- a/apps/infoalloggi/src/pages/prezzi.tsx +++ b/apps/infoalloggi/src/pages/prezzi.tsx @@ -42,8 +42,8 @@ const Prezzi: NextPage = () => { {t.heads.prezzi_titolo} -
-
+
+
{t.prezzi_titolo}
diff --git a/apps/infoalloggi/src/pages/proprietari.tsx b/apps/infoalloggi/src/pages/proprietari.tsx index 551abc8..2b12215 100644 --- a/apps/infoalloggi/src/pages/proprietari.tsx +++ b/apps/infoalloggi/src/pages/proprietari.tsx @@ -16,8 +16,8 @@ const Proprietari: NextPage = () => { {t.proprietari.head} -
-
+
+
{t.proprietari.titolo}
diff --git a/apps/infoalloggi/src/server/controllers/annunci.controller.ts b/apps/infoalloggi/src/server/controllers/annunci.controller.ts index aa0b80b..c4a2807 100644 --- a/apps/infoalloggi/src/server/controllers/annunci.controller.ts +++ b/apps/infoalloggi/src/server/controllers/annunci.controller.ts @@ -175,6 +175,7 @@ export const get_AnnunciPositionsHandler = async ({ "url_immagini", "modificato_il", "stato", + "url_video", "lon_secondario", "lat_secondario", ]) @@ -228,6 +229,7 @@ export type AnnuncioRicerca = Pick< | "url_immagini" | "modificato_il" | "stato" + | "url_video" >; export const getCursor_AnnunciHandler = async ({ @@ -263,6 +265,7 @@ export const getCursor_AnnunciHandler = async ({ "url_immagini", "modificato_il", "stato", + "url_video", ]) .where("web", "=", true)