feat: update defaultValue in PricingComponent to use prop value instead of hardcoded zero
This commit is contained in:
parent
eb36e07076
commit
9d66997001
1 changed files with 3 additions and 1 deletions
|
|
@ -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<number>(0);
|
||||
const [Value, setValue] = useState<number>(defaultValue);
|
||||
const p = pricingData[Value];
|
||||
const downPayment = p?.downPayment || 0;
|
||||
const secondPayment = p?.secondPayment || 0;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue