diff --git a/src/Pages/TaxImpact.jsx b/src/Pages/TaxImpact.jsx index 012a47c..858222d 100644 --- a/src/Pages/TaxImpact.jsx +++ b/src/Pages/TaxImpact.jsx @@ -66,25 +66,16 @@ const TaxImpact = () => { const annualIncome = parseFloat(income) || 0; const propValue = parseFloat(propertyValue) || 0; const data = municipalityData[municipality]; - const incomeTax = annualIncome * data.incomeTaxRate; const propertyTax = propValue * data.propertyTaxRate; const totalTax = incomeTax + propertyTax; - const serviceBreakdown = Object.entries(data.services).map(([service, percentage]) => ({ service, amount: totalTax * percentage, percentage: percentage * 100, icon: serviceIcons[service] || Building })).sort((a, b) => b.amount - a.amount); - - return { - incomeTax, - propertyTax, - totalTax, - serviceBreakdown, - municipality: data.name - }; + return { incomeTax, propertyTax, totalTax, serviceBreakdown, municipality: data.name }; }, [income, propertyValue, municipality]); const formatCurrency = (amount) => { @@ -97,76 +88,63 @@ const TaxImpact = () => { }; return ( -
+
-
-
-
- + {/* Title and Hero */} +
+
+
+
-

+

Civix Tax Impact Calculator

-

- Discover how your tax contributions fund essential local services and build stronger communities across India +

+ Discover how your tax contributions power your community – and build a better future for all.

- -
-
-
-

-
- ₹ Your Tax Information -

-

Enter your details to see your community impact

+ {/* Main grid */} +
+ {/* Inputs + summary */} +
+
+

Tax Info

+

Enter your household details for a custom impact breakdown:

- -
-
- +
+
+
+ setIncome(e.target.value)} + onChange={e => setIncome(e.target.value)} placeholder="e.g., 800000" - className="w-full p-5 pl-12 bg-white dark:bg-gray-700 border-2 border-green-200 dark:border-green-600 rounded-2xl focus:border-green-500 dark:focus:border-green-400 focus:outline-none text-lg dark:text-white shadow-sm group-hover:shadow-md transition-all duration-200 focus:ring-4 focus:ring-green-100 dark:focus:ring-green-900/50" + className="w-full p-5 pl-12 bg-white/90 dark:bg-emerald-900 border-2 border-emerald-100 dark:border-emerald-800/40 rounded-2xl focus:border-emerald-400 dark:focus:border-emerald-500 text-lg dark:text-white shadow-sm focus:ring-emerald-300 transition" /> -
- -
- +
+
+ setPropertyValue(e.target.value)} + onChange={e => setPropertyValue(e.target.value)} placeholder="e.g., 5000000" - className="w-full p-5 pl-12 bg-white dark:bg-gray-700 border-2 border-green-200 dark:border-green-600 rounded-2xl focus:border-green-500 dark:focus:border-green-400 focus:outline-none text-lg dark:text-white shadow-sm group-hover:shadow-md transition-all duration-200 focus:ring-4 focus:ring-green-100 dark:focus:ring-green-900/50" + className="w-full p-5 pl-12 bg-white/90 dark:bg-emerald-900 border-2 border-emerald-100 dark:border-emerald-800/40 rounded-2xl focus:border-emerald-400 dark:focus:border-emerald-600 text-lg dark:text-white shadow-sm focus:ring-emerald-300 transition" /> -
- -
- +
+
- -
-

-
-
- Your Annual Tax Contribution -

+
+

Your Annual Tax Contribution

-
- Local Income Tax: - {formatCurrency(calculations.incomeTax)} +
+ Local Income Tax + {formatCurrency(calculations.incomeTax)}
-
- Property Tax: - {formatCurrency(calculations.propertyTax)} +
+ Property Tax + {formatCurrency(calculations.propertyTax)}
-
-
- Total Annual Taxes: - {formatCurrency(calculations.totalTax)} -
+
+ Total + {formatCurrency(calculations.totalTax)}
- -
-
-

- How Your Taxes Fund Local Services -

-

- Based on {calculations.municipality} budget allocation + {/* Service breakdown impact bars */} +

+
+

How Your Taxes Fund Local Services

+

+ Based on {calculations.municipality} allocation

- -
+
{calculations.serviceBreakdown.map((service, index) => { const IconComponent = service.icon; return ( -
+
-
-
- +
+
+
- {service.service} + {service.service}
-
{formatCurrency(service.amount)}
-
- {service.percentage.toFixed(1)}% -
+
{formatCurrency(service.amount)}
+
{service.percentage.toFixed(1)}%
-
+ {/* Bar */} +
+ className="absolute left-0 top-0 h-4 rounded-full bg-gradient-to-r from-emerald-500 via-green-500 to-emerald-700 dark:from-emerald-500 dark:to-emerald-700 transition-all" + style={{ width: `${service.percentage}%`, minWidth: '3%' }} + />
); })}
- {calculations.totalTax > 0 && ( -
-
-
- -
-

Your Community Impact

+
+
+ +
+
+

Your Community Impact

+

+ Your {formatCurrency(calculations.totalTax)} in local taxes sustains vital services — safety, health, education, and more — shaping a vibrant, future-ready India. +

-

- Your {formatCurrency(calculations.totalTax)} in annual local taxes helps fund essential services - that keep your community safe, educated, and thriving. Every rupee makes a difference in - building a better place to live, work, and raise families across India. -

)}
+ {/* footer */}
-
+
C
- - Powered by Civix - Understanding Your Community - + Powered by Civix – Understanding Your Community
-
-

- Tax rates and service allocations are estimates based on typical Indian municipal budgets. - Actual rates may vary by state and local government. Consult your local municipal corporation - or panchayat for precise figures and current tax policies. +

+

+ Tax rates and allocations are for illustration; actual values vary by location. Verify with your local office for real rates and guidance.

@@ -279,4 +240,4 @@ const TaxImpact = () => { ); }; -export default TaxImpact; \ No newline at end of file +export default TaxImpact;