From 5094255b65730950a2792008eb436121aed90316 Mon Sep 17 00:00:00 2001 From: Marco Pedone Date: Tue, 24 Feb 2026 11:36:26 +0100 Subject: [PATCH] refactor: enhance styling and layout for various components, including Accordion and Pricing sections --- .../src/components/IconComponents.tsx | 4 +- .../src/components/accordionComp.tsx | 3 +- apps/infoalloggi/src/components/prezzi.tsx | 6 +- .../servizio/servizio_annunci_accordions.tsx | 5 +- apps/infoalloggi/src/pages/annuncio/[cod].tsx | 5 +- apps/infoalloggi/src/pages/chi-siamo.tsx | 2 +- apps/infoalloggi/src/pages/guida.tsx | 5 +- apps/infoalloggi/src/pages/prezzi.tsx | 117 ++++++++++-------- 8 files changed, 81 insertions(+), 66 deletions(-) diff --git a/apps/infoalloggi/src/components/IconComponents.tsx b/apps/infoalloggi/src/components/IconComponents.tsx index c3149ab..a4ea66b 100644 --- a/apps/infoalloggi/src/components/IconComponents.tsx +++ b/apps/infoalloggi/src/components/IconComponents.tsx @@ -390,10 +390,10 @@ export const Moon2 = ({ className }: { className?: string }) => ( > Moon ); diff --git a/apps/infoalloggi/src/components/accordionComp.tsx b/apps/infoalloggi/src/components/accordionComp.tsx index 4654d27..d7155f0 100644 --- a/apps/infoalloggi/src/components/accordionComp.tsx +++ b/apps/infoalloggi/src/components/accordionComp.tsx @@ -49,11 +49,12 @@ export const AccordionComp = forwardRef( > {texts.map((text, index) => ( key={`ac-item-${index}`} value={`item-${index}`} > - + {text.title} diff --git a/apps/infoalloggi/src/components/prezzi.tsx b/apps/infoalloggi/src/components/prezzi.tsx index 9c8b710..6e83670 100644 --- a/apps/infoalloggi/src/components/prezzi.tsx +++ b/apps/infoalloggi/src/components/prezzi.tsx @@ -270,16 +270,16 @@ export const PricingComponentConsulenza = ({ }; return ( - + - + {title} Prezzo del servizio - +

diff --git a/apps/infoalloggi/src/components/servizio/servizio_annunci_accordions.tsx b/apps/infoalloggi/src/components/servizio/servizio_annunci_accordions.tsx index c5f781d..605a9e2 100644 --- a/apps/infoalloggi/src/components/servizio/servizio_annunci_accordions.tsx +++ b/apps/infoalloggi/src/components/servizio/servizio_annunci_accordions.tsx @@ -29,7 +29,10 @@ export const AnnunciRichiesti = ({ userId }: { userId: UsersId }) => { return ( - + Annunci Richiesti dall'Utente ({data.length}): diff --git a/apps/infoalloggi/src/pages/annuncio/[cod].tsx b/apps/infoalloggi/src/pages/annuncio/[cod].tsx index 932aae2..3ca12ba 100644 --- a/apps/infoalloggi/src/pages/annuncio/[cod].tsx +++ b/apps/infoalloggi/src/pages/annuncio/[cod].tsx @@ -418,7 +418,10 @@ const CaratteristicheAccordion = ({ defaultValue="altre-caratt" type="single" > - + Altre caratteristiche {Object.entries(filteredCaratt).map(([key, scheda_value]) => { diff --git a/apps/infoalloggi/src/pages/chi-siamo.tsx b/apps/infoalloggi/src/pages/chi-siamo.tsx index 4059ae7..619a073 100644 --- a/apps/infoalloggi/src/pages/chi-siamo.tsx +++ b/apps/infoalloggi/src/pages/chi-siamo.tsx @@ -19,7 +19,7 @@ const ChiSiamo: NextPage = () => {

Ufficio {

{t.faq.titolo}

-

+

{t.faq.descrizione}

@@ -88,10 +88,11 @@ const FAQSection = () => {
{item.qas.map((f, i) => ( - + {f.title} diff --git a/apps/infoalloggi/src/pages/prezzi.tsx b/apps/infoalloggi/src/pages/prezzi.tsx index 1d80b63..e77e53b 100644 --- a/apps/infoalloggi/src/pages/prezzi.tsx +++ b/apps/infoalloggi/src/pages/prezzi.tsx @@ -1,7 +1,7 @@ import type { NextPage } from "next"; import Head from "next/head"; import { AccordionComp } from "~/components/accordionComp"; -import { IconMatrix } from "~/components/IconComponents"; +import { IconMatrix, type IconType } from "~/components/IconComponents"; import { LoadingPage } from "~/components/loading"; import { PricingComponent, @@ -10,6 +10,7 @@ import { import { Status500 } from "~/components/status-page"; import { Badge } from "~/components/ui/badge"; import { Separator } from "~/components/ui/separator"; +import { cn } from "~/lib/utils"; import { useTranslation } from "~/providers/I18nProvider"; import TipologiaPosizioneEnum from "~/schemas/public/TipologiaPosizioneEnum"; import { generateSSGHelper } from "~/server/utils/ssgHelper"; @@ -53,7 +54,7 @@ const Prezzi: NextPage = () => { className="mx-auto flex max-w-5xl flex-col items-center gap-8" id="transitorio" > -

+

{t.prezzi.titolo_servizio_transitori}

{ />

{t.prezzi.desc_transitori}

-
-
    - {t.prezzi.cta_transitori.map((item) => ( -
  • -
    - -
    -
    -

    - {item.titolo} -

    -

    {item.desc}

    -
    -
  • - ))} -
+
+
{/* */} @@ -102,7 +93,7 @@ const Prezzi: NextPage = () => { className="mx-auto flex max-w-5xl flex-col items-center gap-8" id="stabile" > -

+

{t.prezzi.titolo_servizio_stabile}

{ title={t.prezzi.titolo_stabile} />

{t.prezzi.desc_stabile}

-
-
    - {t.prezzi.cta_stabile.map((item) => ( -
  • -
    - -
    -
    -

    - {item.titolo} -

    -

    {item.desc}

    -
    -
  • - ))} -
+
+
{/* */} @@ -146,7 +127,7 @@ const Prezzi: NextPage = () => { className="mx-auto flex max-w-5xl flex-col items-center gap-8" id="contratti" > -

+

{t.prezzi.titolo_servizio_contratti}

@@ -165,26 +146,16 @@ const Prezzi: NextPage = () => { title={t.prezzi.titolo_contratti} />

{t.prezzi.desc_contratti}

-
-
    - {t.prezzi.cta_contratti.map((item) => ( -
  • -
    - -
    -
    -

    - {item.titolo} -

    -

    {item.desc}

    -
    -
  • - ))} -
+
+
{/* */} @@ -204,3 +175,39 @@ export async function getServerSideProps() { } export default Prezzi; + +const GridTesti = ({ + testi, + iconClassName, + titleClassName, +}: { + testi: Array<{ titolo: string; desc: string; icon: IconType }>; + iconClassName: string; + titleClassName: string; +}) => { + return ( +
    + {testi.map((item) => ( +
  • +
    + +
    +
    +

    + {item.titolo} +

    +

    {item.desc}

    +
    +
  • + ))} +
+ ); +};