Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 13fbcdc779 |
@@ -11,8 +11,29 @@ import FaqBase from '@/components/sections/faq/FaqBase';
|
||||
import ContactCenter from '@/components/sections/contact/ContactCenter';
|
||||
import FooterBase from '@/components/sections/footer/FooterBase';
|
||||
import { Calendar, Zap, Lightbulb, Home, Sun, TrendingUp, HelpCircle, Mail } from 'lucide-react';
|
||||
import { useState } from 'react';
|
||||
import Input from '@/components/form/Input';
|
||||
|
||||
export default function LandingPage() {
|
||||
const [billValue, setBillValue] = useState('');
|
||||
const [showCalculator, setShowCalculator] = useState(false);
|
||||
|
||||
const calculateSavings = () => {
|
||||
const monthlyBill = parseFloat(billValue);
|
||||
if (isNaN(monthlyBill) || monthlyBill <= 0) {
|
||||
return null;
|
||||
}
|
||||
// Estimate 70% savings with Eletrotech solar panels
|
||||
const monthlySavings = monthlyBill * 0.70;
|
||||
const yearlySavings = monthlySavings * 12;
|
||||
return {
|
||||
monthly: monthlySavings.toFixed(2),
|
||||
yearly: yearlySavings.toFixed(2)
|
||||
};
|
||||
};
|
||||
|
||||
const savings = calculateSavings();
|
||||
|
||||
return (
|
||||
<ThemeProvider
|
||||
defaultButtonVariant="icon-arrow"
|
||||
@@ -53,7 +74,7 @@ export default function LandingPage() {
|
||||
{ src: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AleAYJVuZaVjviN7tEK4F5SJ6k/professional-headshot-of-another-satisfi-1773171517163-b04595bc.png", alt: "Cliente Eletrosolartec" }
|
||||
]}
|
||||
buttons={[
|
||||
{ text: "Gerar Orçamento Grátis", href: "contact" },
|
||||
{ text: "Simule A sua Economia Grátis", onClick: () => setShowCalculator(!showCalculator) },
|
||||
{ text: "Saiba Mais", href: "about" }
|
||||
]}
|
||||
imageSrc="https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AleAYJVuZaVjviN7tEK4F5SJ6k/modern-solar-photovoltaic-panels-install-1773171517232-83f497e5.png"
|
||||
@@ -67,6 +88,54 @@ export default function LandingPage() {
|
||||
/>
|
||||
</div>
|
||||
|
||||
{showCalculator && (
|
||||
<div id="calculator" data-section="calculator" className="py-16 px-6 bg-card rounded-lg max-w-2xl mx-auto">
|
||||
<div className="text-center mb-8">
|
||||
<h2 className="text-3xl font-bold mb-4">Calculadora de Economia Solar</h2>
|
||||
<p className="text-foreground opacity-75">Digite sua conta de energia atual e veja quanto você pode economizar com painéis solares Eletrotech</p>
|
||||
</div>
|
||||
|
||||
<div className="space-y-6">
|
||||
<div>
|
||||
<label className="block text-sm font-medium mb-2">Sua Conta de Energia Mensal (R$)</label>
|
||||
<Input
|
||||
value={billValue}
|
||||
onChange={setBillValue}
|
||||
type="number"
|
||||
placeholder="Ex: 250.00"
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
|
||||
{savings && (
|
||||
<div className="bg-background rounded-lg p-6 border border-accent">
|
||||
<h3 className="text-xl font-semibold mb-4">Sua Economia Estimada com Eletrotech</h3>
|
||||
<div className="grid grid-cols-2 gap-4">
|
||||
<div className="text-center p-4 bg-card rounded-lg">
|
||||
<p className="text-sm text-foreground opacity-75 mb-2">Economia Mensal</p>
|
||||
<p className="text-2xl font-bold text-primary-cta">R$ {savings.monthly}</p>
|
||||
</div>
|
||||
<div className="text-center p-4 bg-card rounded-lg">
|
||||
<p className="text-sm text-foreground opacity-75 mb-2">Economia Anual</p>
|
||||
<p className="text-2xl font-bold text-primary-cta">R$ {savings.yearly}</p>
|
||||
</div>
|
||||
</div>
|
||||
<p className="text-xs text-foreground opacity-60 mt-4 text-center">
|
||||
*Estimativa baseada em 70% de redução com sistemas solares Eletrotech. Consulte nossos especialistas para análise personalizada.
|
||||
</p>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<button
|
||||
onClick={() => setShowCalculator(false)}
|
||||
className="w-full py-3 px-4 bg-primary-cta text-primary-cta-text rounded-lg font-medium hover:opacity-90 transition-opacity"
|
||||
>
|
||||
Fechar Calculadora
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div id="about" data-section="about">
|
||||
<TextSplitAbout
|
||||
title="Sobre EletroTech"
|
||||
|
||||
Reference in New Issue
Block a user