From 9d66997001fa86e6e2716efd2032ca63d8c7170d Mon Sep 17 00:00:00 2001 From: Marco Pedone Date: Mon, 16 Mar 2026 17:57:48 +0100 Subject: [PATCH] feat: update defaultValue in PricingComponent to use prop value instead of hardcoded zero --- apps/infoalloggi/src/components/prezzi.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/infoalloggi/src/components/prezzi.tsx b/apps/infoalloggi/src/components/prezzi.tsx index 9bf6a13..ac0fd55 100644 --- a/apps/infoalloggi/src/components/prezzi.tsx +++ b/apps/infoalloggi/src/components/prezzi.tsx @@ -103,6 +103,7 @@ export const PricingComponent = ({ opzioni, cta, statico = false, + defaultValue = 0, className, title, tipo, @@ -113,12 +114,13 @@ export const PricingComponent = ({ title: string; cta: string; statico?: boolean; + defaultValue?: number; className?: string; tipo: TipologiaPosizioneEnum; optionsBtnClassName?: string; }) => { const { t } = useTranslation(); - const [Value, setValue] = useState(0); + const [Value, setValue] = useState(defaultValue); const p = pricingData[Value]; const downPayment = p?.downPayment || 0; const secondPayment = p?.secondPayment || 0;