fix display discount

This commit is contained in:
hamid zarghami
2025-05-03 14:53:33 +03:30
parent 551dfa0a56
commit 7fd9aca86f
@@ -25,8 +25,8 @@ const ServiceHeader: FC<Props> = (props: Props) => {
useEffect(() => { useEffect(() => {
const plan: PlanItemType = data?.subscriptionPlans.find((item) => item.id === planSelected) const plan: PlanItemType = data?.subscriptionPlans.find((item) => item.id === planSelected)
setFinalPrice(plan.originalPrice) setFinalPrice(plan.price)
setPrice(plan?.price) setPrice(plan?.originalPrice)
}, [planSelected]) }, [planSelected])
@@ -82,7 +82,7 @@ const ServiceHeader: FC<Props> = (props: Props) => {
{NumberFormat(Number(price))} {NumberFormat(Number(price))}
</div> </div>
} }
<div>{NumberFormat(Number(price))}</div> <div>{NumberFormat(Number(finalPrice))}</div>
</div> </div>
<span>{t('toman')}</span> <span>{t('toman')}</span>
</div> </div>