fix: estimator always shows price (no false loading state)
This commit is contained in:
@@ -6,7 +6,7 @@ import { usePricing } from '../hooks/usePricing';
|
||||
const Estimator = () => {
|
||||
const [area, setArea] = useState(20);
|
||||
const [thickness, setThickness] = useState(200);
|
||||
const { prices, loading: pricesLoading } = usePricing();
|
||||
const { prices } = usePricing();
|
||||
|
||||
const costPerSqM = prices[thickness] ?? (thickness === 200 ? 2000 : 3000);
|
||||
const estimatedCost = area * costPerSqM;
|
||||
@@ -96,7 +96,7 @@ const Estimator = () => {
|
||||
|
||||
<h3 style={{ fontSize: '1.3rem', color: 'var(--text-muted)', marginBottom: '15px' }}>Ориентировочная стоимость</h3>
|
||||
<div style={{ fontSize: '3.8rem', fontWeight: 800, fontFamily: 'var(--font-heading)', color: 'var(--text-main)', marginBottom: '20px' }}>
|
||||
{pricesLoading ? '...' : estimatedCost.toLocaleString('ru-RU')} ₽
|
||||
{estimatedCost.toLocaleString('ru-RU')} ₽
|
||||
</div>
|
||||
<p style={{ fontSize: '1rem', color: 'var(--text-muted)', marginBottom: '35px', lineHeight: '1.6' }}>
|
||||
Включает бронематериалы, специализированный монтаж и финальную проверку.
|
||||
|
||||
Reference in New Issue
Block a user