From 0a2ce665b2d9dde594f5f53346cd939aabef0239 Mon Sep 17 00:00:00 2001 From: MichalC <103170279+wSBMichalee@users.noreply.github.com> Date: Thu, 3 Sep 2026 12:44:39 +0200 Subject: [PATCH] feat(contact): remove eyebrow, add service select field and align rounded-none styling --- src/blocks/ContactInfo/Component.tsx | 67 +++++++++++++++++++++------- 1 file changed, 51 insertions(+), 16 deletions(-) diff --git a/src/blocks/ContactInfo/Component.tsx b/src/blocks/ContactInfo/Component.tsx index 99fd480..6fbc190 100644 --- a/src/blocks/ContactInfo/Component.tsx +++ b/src/blocks/ContactInfo/Component.tsx @@ -15,12 +15,18 @@ export const ContactInfoBlock: React.FC = ({ const pathname = usePathname() const isDe = pathname?.startsWith('/de') - const [formData, setFormData] = useState({ name: '', email: '', message: '' }) + const [formData, setFormData] = useState({ + service: '', + name: '', + email: '', + message: '', + }) const [submitted, setSubmitted] = useState(false) const handleSubmit = (e: React.FormEvent) => { e.preventDefault() - // TODO: Podłączyć logikę wysyłki formularza przez backend API (np. Resend / SMTP / Payload custom endpoint) + // TODO: Podłączyć logikę wysyłki formularza przez backend API (np. Resend / SMTP / Payload custom endpoint). + // Pamiętać o przekazaniu w payloadzie: formData.service (wybrana usługa), formData.name, formData.email, formData.message. setSubmitted(true) } @@ -31,7 +37,7 @@ export const ContactInfoBlock: React.FC = ({ {/* Kolumna 1: Dane kontaktowe + WhatsApp CTA (Główna opcja) */}
-
+

{isDe ? 'Direkter Kontakt' : 'Bezpośredni kontakt'}

@@ -39,7 +45,7 @@ export const ContactInfoBlock: React.FC = ({
    {address && (
  • -
    +
    @@ -53,7 +59,7 @@ export const ContactInfoBlock: React.FC = ({ {phone && (
  • -
    +
    @@ -69,7 +75,7 @@ export const ContactInfoBlock: React.FC = ({ {email && (
  • -
    +
    @@ -85,7 +91,7 @@ export const ContactInfoBlock: React.FC = ({ {hours && (
  • -
    +
    @@ -100,7 +106,7 @@ export const ContactInfoBlock: React.FC = ({
    {/* Główne CTA: WhatsApp */} -
    +
    {isDe ? 'Empfohlen & Am schnellsten' : 'Zalecany i najszybszy kontakt'} @@ -125,11 +131,8 @@ export const ContactInfoBlock: React.FC = ({
    {/* Kolumna 2: Prosty formularz kontaktowy (Drugorzędna opcja) */} -
    +
    - - {isDe ? 'Nachricht senden' : 'Napisz wiadomość'} -

    {isDe ? 'Kontaktformular' : 'Formularz kontaktowy'}

    @@ -141,7 +144,7 @@ export const ContactInfoBlock: React.FC = ({
    {submitted ? ( -
    +

    {isDe ? 'Vielen Dank für Ihre Nachricht!' : 'Dziękujemy za wiadomość!'}

    @@ -153,6 +156,38 @@ export const ContactInfoBlock: React.FC = ({
    ) : (
    +
    + + +
    +
    @@ -179,7 +214,7 @@ export const ContactInfoBlock: React.FC = ({ value={formData.email} onChange={(e) => setFormData({ ...formData, email: e.target.value })} placeholder="kontakt@example.com" - className="w-full px-4 py-3 bg-background border border-border rounded-lg text-foreground focus:outline-none focus:ring-2 focus:ring-accent focus:border-transparent transition-all" + className="w-full px-4 py-3 bg-background border border-border rounded-none text-foreground focus:outline-none focus:ring-2 focus:ring-accent focus:border-transparent transition-all" />
    @@ -194,7 +229,7 @@ export const ContactInfoBlock: React.FC = ({ value={formData.message} onChange={(e) => setFormData({ ...formData, message: e.target.value })} placeholder={isDe ? 'Wie können wir Ihnen helfen?' : 'W czym możemy Ci pomóc? Opisz krótko swoją sprawę...'} - className="w-full px-4 py-3 bg-background border border-border rounded-lg text-foreground focus:outline-none focus:ring-2 focus:ring-accent focus:border-transparent transition-all resize-y" + className="w-full px-4 py-3 bg-background border border-border rounded-none text-foreground focus:outline-none focus:ring-2 focus:ring-accent focus:border-transparent transition-all resize-y" />