Naprawa błędów ESLint oraz typowań TypeScript dla Zod

This commit is contained in:
AI Bot
2026-08-09 23:14:10 +02:00
parent 296e3cb968
commit 9538fc72e5
10 changed files with 999 additions and 37 deletions
+142
View File
@@ -0,0 +1,142 @@
import { NextRequest, NextResponse } from "next/server";
import { z } from "zod";
const kontaktSchema = z.object({
name: z
.string()
.min(2, "Imię i nazwisko musi mieć min. 2 znaki")
.max(100, "Imię i nazwisko jest za długie"),
phone: z
.string()
.regex(
/^(\+48\s?)?(\d{3}\s?\d{3}\s?\d{3}|\d{9})$/,
"Podaj prawidłowy numer telefonu (9 cyfr, opcjonalnie +48)"
),
email: z.string().email("Podaj prawidłowy adres e-mail"),
subject: z.enum(
[
"nadzor-inwestorski",
"generalne-wykonawstwo",
"kierowanie-budowa",
"inwestor-zastepczy",
"inne",
],
{ message: "Wybierz temat zapytania" }
),
message: z
.string()
.min(20, "Wiadomość musi mieć min. 20 znaków")
.max(5000, "Wiadomość jest za długa"),
consent: z.literal(true, {
error: "Zgoda na przetwarzanie danych jest wymagana",
}),
// Honeypot — musi być puste
website: z.string().max(0, "").optional(),
});
const SUBJECT_LABELS: Record<string, string> = {
"nadzor-inwestorski": "Nadzór inwestorski",
"generalne-wykonawstwo": "Generalne wykonawstwo",
"kierowanie-budowa": "Kierowanie budową",
"inwestor-zastepczy": "Inwestor zastępczy",
inne: "Inne",
};
export async function POST(request: NextRequest) {
try {
const body = await request.json();
// Walidacja Zod
const result = kontaktSchema.safeParse(body);
if (!result.success) {
const fieldErrors = result.error.flatten().fieldErrors;
return NextResponse.json(
{ error: { message: "Błąd walidacji formularza", code: "VALIDATION_ERROR", fields: fieldErrors } },
{ status: 400 }
);
}
const data = result.data;
// Honeypot check — jeśli wypełnione, bot
if (data.website && data.website.length > 0) {
// Udajemy sukces, żeby bot nie wiedział
return NextResponse.json({ success: true });
}
// Sprawdź klucz Resend
const resendApiKey = process.env.RESEND_API_KEY;
if (!resendApiKey || resendApiKey === "your_resend_api_key") {
console.warn(
"[KONTAKT] Klucz RESEND_API_KEY nie jest skonfigurowany. E-mail NIE został wysłany. Dane formularza:",
{ name: data.name, email: data.email, subject: data.subject }
);
// Zwracamy sukces, żeby frontend działał w trybie dev
return NextResponse.json({
success: true,
_dev: "E-mail nie wysłany — brak klucza RESEND_API_KEY",
});
}
// Wysyłka przez Resend
const { Resend } = await import("resend");
const resend = new Resend(resendApiKey);
const subjectLabel = SUBJECT_LABELS[data.subject] || data.subject;
const { error } = await resend.emails.send({
from: "BNT Formularz <[email protected]>",
to: "[email protected]",
replyTo: data.email,
subject: `Nowe zapytanie: ${subjectLabel} — ${data.name}`,
html: `
<div style="font-family: sans-serif; max-width: 600px; margin: 0 auto;">
<h2 style="color: #1E3A5F; border-bottom: 2px solid #1E3A5F; padding-bottom: 8px;">
Nowe zapytanie z formularza kontaktowego
</h2>
<table style="width: 100%; border-collapse: collapse; margin-top: 16px;">
<tr>
<td style="padding: 8px 12px; font-weight: 600; color: #52525B; width: 140px; vertical-align: top;">Imię i nazwisko</td>
<td style="padding: 8px 12px;">${data.name}</td>
</tr>
<tr style="background: #F4F4F5;">
<td style="padding: 8px 12px; font-weight: 600; color: #52525B; vertical-align: top;">Telefon</td>
<td style="padding: 8px 12px;"><a href="tel:${data.phone}">${data.phone}</a></td>
</tr>
<tr>
<td style="padding: 8px 12px; font-weight: 600; color: #52525B; vertical-align: top;">E-mail</td>
<td style="padding: 8px 12px;"><a href="mailto:${data.email}">${data.email}</a></td>
</tr>
<tr style="background: #F4F4F5;">
<td style="padding: 8px 12px; font-weight: 600; color: #52525B; vertical-align: top;">Temat</td>
<td style="padding: 8px 12px;">${subjectLabel}</td>
</tr>
<tr>
<td style="padding: 8px 12px; font-weight: 600; color: #52525B; vertical-align: top;">Wiadomość</td>
<td style="padding: 8px 12px; white-space: pre-wrap;">${data.message}</td>
</tr>
</table>
<p style="margin-top: 24px; font-size: 12px; color: #999;">
Wiadomość wysłana z formularza na stronie bntbudownictwo.pl
</p>
</div>
`,
});
if (error) {
console.error("[KONTAKT] Błąd Resend:", error);
return NextResponse.json(
{ error: { message: "Nie udało się wysłać wiadomości. Spróbuj ponownie później lub zadzwoń.", code: "SEND_ERROR" } },
{ status: 500 }
);
}
return NextResponse.json({ success: true });
} catch (err) {
console.error("[KONTAKT] Nieoczekiwany błąd:", err);
return NextResponse.json(
{ error: { message: "Wystąpił nieoczekiwany błąd. Spróbuj ponownie później lub zadzwoń bezpośrednio.", code: "INTERNAL_ERROR" } },
{ status: 500 }
);
}
}
-2
View File
@@ -33,8 +33,6 @@
@apply text-body-mobile lg:text-body-desktop font-body text-brand-muted;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
/* Wymuszenie grayscale antialiasing na systemach Windows, aby zapobiec kolorowemu fringingowi (ClearType) na małych czcionkach mono */
text-shadow: 0 0 1px rgba(0,0,0,0.01);
}
small, caption {
+11
View File
@@ -0,0 +1,11 @@
import type { Metadata } from "next";
export const metadata: Metadata = {
title: "Kontakt — Formularz Wyceny | BNT Budownictwo Wrocław",
description:
"Skontaktuj się z BNT Budownictwo. Wypełnij formularz wyceny lub zadzwoń — odpowiadamy w ciągu 24h. Nadzór inwestorski, generalne wykonawstwo, Wrocław i Dolny Śląsk.",
};
export default function KontaktLayout({ children }: { children: React.ReactNode }) {
return children;
}
+589
View File
@@ -0,0 +1,589 @@
"use client";
import React, { useState } from "react";
import Link from "next/link";
import { useForm } from "react-hook-form";
import { zodResolver } from "@hookform/resolvers/zod";
import { z } from "zod";
import {
MapPin,
Phone,
Mail,
Clock,
CheckCircle,
AlertCircle,
MessageSquare,
Shield,
Zap,
} from "lucide-react";
import { SectionHeader } from "@/components/ui/SectionHeader";
import { Reveal } from "@/components/ui/Reveal";
import { TechCorners } from "@/components/ui/TechCorners";
import { Button } from "@/components/ui/Button";
// ─── Social Media Icons (spójne z Footer.tsx) ───────────────────────────────
const FacebookIcon = ({ className = "" }: { className?: string }) => (
<svg
role="img"
viewBox="0 0 24 24"
fill="currentColor"
xmlns="http://www.w3.org/2000/svg"
className={className}
>
<title>Facebook</title>
<path d="M9.101 23.691v-7.98H6.627v-3.667h2.474v-1.58c0-4.085 1.848-5.978 5.858-5.978.401 0 .955.042 1.468.103a8.68 8.68 0 0 1 1.141.195v3.325a8.623 8.623 0 0 0-.653-.036 26.805 26.805 0 0 0-.733-.009c-1.125 0-2.517.236-2.517 1.443v2.53h3.692c-.104 1.848-.314 3.667-.314 3.667h-3.378v7.98H9.101Z" />
</svg>
);
const LinkedinIcon = ({ className = "" }: { className?: string }) => (
<svg
role="img"
viewBox="0 0 24 24"
fill="currentColor"
xmlns="http://www.w3.org/2000/svg"
className={className}
>
<title>LinkedIn</title>
<path d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z" />
</svg>
);
// ─── Zod Schema ──────────────────────────────────────────────────────────────
const kontaktSchema = z.object({
name: z
.string()
.min(2, "Imię i nazwisko musi mieć min. 2 znaki")
.max(100, "Imię i nazwisko jest za długie"),
phone: z
.string()
.regex(
/^(\+48\s?)?(\d{3}\s?\d{3}\s?\d{3}|\d{9})$/,
"Podaj prawidłowy numer telefonu (9 cyfr, opcjonalnie +48)"
),
email: z.string().email("Podaj prawidłowy adres e-mail"),
subject: z.enum(
[
"nadzor-inwestorski",
"generalne-wykonawstwo",
"kierowanie-budowa",
"inwestor-zastepczy",
"inne",
],
{ message: "Wybierz temat zapytania" }
),
message: z
.string()
.min(20, "Wiadomość musi mieć min. 20 znaków")
.max(5000, "Wiadomość jest za długa"),
consent: z.literal(true, {
error: "Zgoda na przetwarzanie danych jest wymagana",
}),
website: z.string().max(0).optional(),
});
type KontaktFormData = z.infer<typeof kontaktSchema>;
const SUBJECT_OPTIONS = [
{ value: "", label: "Wybierz temat zapytania..." },
{ value: "nadzor-inwestorski", label: "Nadzór inwestorski" },
{ value: "generalne-wykonawstwo", label: "Generalne wykonawstwo" },
{ value: "kierowanie-budowa", label: "Kierowanie budową" },
{ value: "inwestor-zastepczy", label: "Inwestor zastępczy" },
{ value: "inne", label: "Inne" },
];
// ─── Input Styling ───────────────────────────────────────────────────────────
const inputBase =
"w-full rounded-lg border bg-white px-4 py-3 text-body-mobile lg:text-body-desktop font-body text-brand-text placeholder:text-brand-muted/50 transition-colors duration-150 ease-out focus:outline-none focus:ring-2 focus:ring-brand-primary focus:border-brand-primary";
const inputDefault = "border-brand-border";
const inputError = "border-red-500 focus:ring-red-500 focus:border-red-500";
function FieldError({ message }: { message?: string }) {
if (!message) return null;
return (
<p className="mt-1.5 flex items-center gap-1 text-small-mobile text-red-500" role="alert">
<AlertCircle className="w-3.5 h-3.5 flex-shrink-0" aria-hidden="true" strokeWidth={2} />
{message}
</p>
);
}
// ─── Component ───────────────────────────────────────────────────────────────
export default function KontaktPage() {
const [formState, setFormState] = useState<"idle" | "submitting" | "success" | "error">("idle");
const [serverError, setServerError] = useState<string | null>(null);
const {
register,
handleSubmit,
formState: { errors },
reset,
} = useForm<KontaktFormData>({
resolver: zodResolver(kontaktSchema),
defaultValues: {
name: "",
phone: "",
email: "",
subject: undefined,
message: "",
consent: undefined,
website: "",
},
});
const onSubmit = async (data: KontaktFormData) => {
setFormState("submitting");
setServerError(null);
try {
const res = await fetch("/api/kontakt", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(data),
});
const json = await res.json();
if (!res.ok) {
setServerError(json.error?.message || "Wystąpił błąd. Spróbuj ponownie.");
setFormState("error");
return;
}
setFormState("success");
reset();
} catch {
setServerError("Nie udało się połączyć z serwerem. Sprawdź połączenie internetowe i spróbuj ponownie.");
setFormState("error");
}
};
return (
<div className="flex flex-col min-h-screen">
{/* ─── 1. Hero ────────────────────────────────────────────────── */}
<section className="pt-32 pb-24 md:pt-48 md:pb-32 lg:pt-56 lg:pb-48 bg-brand-deepDark w-full relative overflow-hidden">
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 relative z-10 w-full">
<Reveal>
<div className="font-mono text-small-mobile tracking-widest text-brand-muted uppercase mb-8">
<Link href="/" className="hover:text-white transition-colors">
Strona główna
</Link>
<span className="mx-3 opacity-50">/</span>
<span className="text-white">Kontakt</span>
</div>
</Reveal>
<SectionHeader
eyebrow="Skontaktuj się z nami"
title="Porozmawiajmy o Twojej inwestycji"
lead="Odpowiadamy w ciągu 24 godzin roboczych. Wypełnij formularz lub zadzwoń bezpośrednio — chętnie omówimy szczegóły Twojego projektu."
theme="dark"
align="left"
size="xl"
/>
</div>
</section>
{/* ─── 2. Formularz + Dane kontaktowe ──────────────────────── */}
<section className="py-24 md:py-32 lg:py-48 bg-brand-surface w-full">
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div className="grid grid-cols-1 lg:grid-cols-5 gap-12 lg:gap-16 items-stretch">
{/* Lewa: Formularz */}
<Reveal className="lg:col-span-3" delay={0.1}>
<div className="bg-white border border-brand-border rounded-xl p-6 sm:p-8 lg:p-10 h-full">
<h2 className="text-h3-mobile md:text-h3-tablet lg:text-h3-desktop font-heading font-semibold text-brand-text mb-2">
Formularz wyceny
</h2>
<p className="text-body-mobile text-brand-muted mb-8">
Opisz swój projekt, a my przygotujemy wstępną wycenę.
</p>
{formState === "success" ? (
/* ── Stan sukcesu ── */
<div className="flex flex-col items-center justify-center text-center py-16 lg:py-24">
<div className="w-16 h-16 rounded-full bg-green-50 flex items-center justify-center mb-6">
<CheckCircle
className="w-8 h-8 text-green-600"
aria-hidden="true"
strokeWidth={1.5}
/>
</div>
<h3 className="text-h3-mobile font-heading font-semibold text-brand-text mb-3">
Wiadomość wysłana
</h3>
<p className="text-body-mobile text-brand-muted max-w-sm mb-8">
Dziękujemy za kontakt. Odpowiemy w ciągu 24 godzin roboczych na podany adres
e-mail.
</p>
<Button
variant="outline"
size="md"
type="button"
onClick={() => setFormState("idle")}
>
Wyślij kolejną wiadomość
</Button>
</div>
) : (
/* ── Formularz ── */
<form onSubmit={handleSubmit(onSubmit)} noValidate className="space-y-6">
{/* Honeypot — ukryte pole */}
<div className="absolute -left-[9999px]" aria-hidden="true">
<label htmlFor="website">Website</label>
<input
type="text"
id="website"
tabIndex={-1}
autoComplete="off"
{...register("website")}
/>
</div>
{/* Imię i nazwisko */}
<div>
<label
htmlFor="contact-name"
className="block text-small-desktop font-medium text-brand-text mb-2"
>
Imię i nazwisko <span className="text-red-500">*</span>
</label>
<input
type="text"
id="contact-name"
placeholder="Jan Kowalski"
className={`${inputBase} ${errors.name ? inputError : inputDefault}`}
aria-invalid={!!errors.name}
aria-describedby={errors.name ? "name-error" : undefined}
{...register("name")}
/>
<FieldError message={errors.name?.message} />
</div>
{/* Telefon + E-mail — 2 kolumny */}
<div className="grid grid-cols-1 sm:grid-cols-2 gap-6">
<div>
<label
htmlFor="contact-phone"
className="block text-small-desktop font-medium text-brand-text mb-2"
>
Telefon <span className="text-red-500">*</span>
</label>
<input
type="tel"
id="contact-phone"
placeholder="+48 123 456 789"
className={`${inputBase} ${errors.phone ? inputError : inputDefault}`}
aria-invalid={!!errors.phone}
{...register("phone")}
/>
<FieldError message={errors.phone?.message} />
</div>
<div>
<label
htmlFor="contact-email"
className="block text-small-desktop font-medium text-brand-text mb-2"
>
E-mail <span className="text-red-500">*</span>
</label>
<input
type="email"
id="contact-email"
placeholder="[email protected]"
className={`${inputBase} ${errors.email ? inputError : inputDefault}`}
aria-invalid={!!errors.email}
{...register("email")}
/>
<FieldError message={errors.email?.message} />
</div>
</div>
{/* Temat */}
<div>
<label
htmlFor="contact-subject"
className="block text-small-desktop font-medium text-brand-text mb-2"
>
Temat zapytania <span className="text-red-500">*</span>
</label>
<select
id="contact-subject"
className={`${inputBase} ${errors.subject ? inputError : inputDefault} appearance-none bg-[url('data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%3E%3Cpath%20d%3D%22M5%207.5L10%2012.5L15%207.5%22%20stroke%3D%22%2352525B%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E')] bg-no-repeat bg-[right_12px_center]`}
aria-invalid={!!errors.subject}
defaultValue=""
{...register("subject")}
>
{SUBJECT_OPTIONS.map((opt) => (
<option key={opt.value} value={opt.value} disabled={opt.value === ""}>
{opt.label}
</option>
))}
</select>
<FieldError message={errors.subject?.message} />
</div>
{/* Wiadomość */}
<div>
<label
htmlFor="contact-message"
className="block text-small-desktop font-medium text-brand-text mb-2"
>
Wiadomość <span className="text-red-500">*</span>
</label>
<textarea
id="contact-message"
rows={5}
placeholder="Opisz swój projekt, lokalizację, orientacyjny zakres prac..."
className={`${inputBase} resize-y min-h-[120px] ${
errors.message ? inputError : inputDefault
}`}
aria-invalid={!!errors.message}
{...register("message")}
/>
<FieldError message={errors.message?.message} />
</div>
{/* RODO */}
<div className="flex items-start gap-3">
<input
type="checkbox"
id="contact-consent"
className="mt-1 h-4 w-4 rounded border-brand-border text-brand-primary focus:ring-brand-primary cursor-pointer flex-shrink-0"
aria-invalid={!!errors.consent}
{...register("consent")}
/>
<label
htmlFor="contact-consent"
className="text-small-mobile text-brand-muted cursor-pointer leading-relaxed"
>
Wyrażam zgodę na przetwarzanie danych osobowych w celu udzielenia odpowiedzi
na zapytanie (zgodnie z{" "}
<Link
href="/polityka-prywatnosci"
className="underline hover:text-brand-primary transition-colors"
>
Polityką Prywatności
</Link>
). <span className="text-red-500">*</span>
</label>
</div>
{errors.consent && <FieldError message={errors.consent.message} />}
{/* Błąd serwera */}
{formState === "error" && serverError && (
<div
className="flex items-start gap-3 p-4 rounded-lg bg-red-50 border border-red-200 text-red-700 text-small-desktop"
role="alert"
>
<AlertCircle className="w-5 h-5 flex-shrink-0 mt-0.5" aria-hidden="true" strokeWidth={1.5} />
<div>
<p className="font-medium">{serverError}</p>
<p className="text-red-600/70 mt-1">
Możesz też zadzwonić bezpośrednio:{" "}
<a href="tel:+48000000000" className="underline font-medium">
+48 000 000 000
</a>
</p>
</div>
</div>
)}
{/* Submit */}
<div className="pt-2">
<Button
type="submit"
variant="primary"
size="lg"
className="w-full sm:w-auto"
isLoading={formState === "submitting"}
disabled={formState === "submitting"}
>
{formState === "submitting" ? "Wysyłanie..." : "Wyślij wiadomość"}
</Button>
</div>
</form>
)}
</div>
</Reveal>
{/* Prawa: Dane kontaktowe + Mapa */}
<div className="lg:col-span-2 flex flex-col gap-8">
<Reveal delay={0.2} className="flex-1">
<div className="group relative bg-white border border-brand-border rounded-xl p-6 sm:p-8 h-full">
<TechCorners />
<h3 className="text-h4-mobile md:text-h4-desktop font-heading font-semibold text-brand-text mb-6">
Dane kontaktowe
</h3>
<ul className="space-y-6">
<li className="flex items-start gap-3">
<MapPin
className="w-5 h-5 text-brand-primary flex-shrink-0 mt-0.5"
aria-hidden="true"
strokeWidth={1.5}
/>
<div>
<span className="block text-small-desktop font-mono text-brand-muted/60 uppercase tracking-widest mb-1">
Siedziba
</span>
<span className="text-body-mobile text-brand-text">
ul. Budowlana 12
<br />
50-000 Wrocław
</span>
</div>
</li>
<li className="flex items-start gap-3">
<Phone
className="w-5 h-5 text-brand-primary flex-shrink-0 mt-0.5"
aria-hidden="true"
strokeWidth={1.5}
/>
<div>
<span className="block text-small-desktop font-mono text-brand-muted/60 uppercase tracking-widest mb-1">
Telefon
</span>
<a
href="tel:+48000000000"
className="text-body-mobile text-brand-text hover:text-brand-primary transition-colors"
>
+48 000 000 000
</a>
</div>
</li>
<li className="flex items-start gap-3">
<Mail
className="w-5 h-5 text-brand-primary flex-shrink-0 mt-0.5"
aria-hidden="true"
strokeWidth={1.5}
/>
<div>
<span className="block text-small-desktop font-mono text-brand-muted/60 uppercase tracking-widest mb-1">
E-mail
</span>
<a
href="mailto:[email protected]"
className="text-body-mobile text-brand-text hover:text-brand-primary transition-colors"
>
biuro@bntbudownictwo.pl
</a>
</div>
</li>
<li className="flex items-start gap-3">
<Clock
className="w-5 h-5 text-brand-primary flex-shrink-0 mt-0.5"
aria-hidden="true"
strokeWidth={1.5}
/>
<div>
<span className="block text-small-desktop font-mono text-brand-muted/60 uppercase tracking-widest mb-1">
Godziny pracy
</span>
<span className="text-body-mobile text-brand-text">
Pon — Pt: 8:00 — 16:00
</span>
</div>
</li>
</ul>
{/* Social */}
<div className="mt-8 pt-6 border-t border-brand-border/50">
<span className="block text-small-desktop font-mono text-brand-muted/60 uppercase tracking-widest mb-4">
Social media
</span>
<div className="flex items-center gap-3">
<a
href="#"
className="w-10 h-10 rounded-full border border-brand-border flex items-center justify-center text-brand-muted hover:bg-brand-primary hover:text-white hover:border-brand-primary transition-all duration-300"
aria-label="Facebook"
>
<FacebookIcon className="w-4 h-4" />
</a>
<a
href="#"
className="w-10 h-10 rounded-full border border-brand-border flex items-center justify-center text-brand-muted hover:bg-brand-primary hover:text-white hover:border-brand-primary transition-all duration-300"
aria-label="LinkedIn"
>
<LinkedinIcon className="w-4 h-4" />
</a>
</div>
</div>
</div>
</Reveal>
{/* Mapa */}
<Reveal delay={0.3}>
<div className="rounded-xl overflow-hidden border border-brand-border shadow-sm h-[280px] lg:h-[300px]">
<iframe
title="Lokalizacja BNT Budownictwo — Wrocław"
src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d80254.98065893057!2d16.933622563700937!3d51.10788730000001!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x470fe9c2d4b58abf%3A0xb70956aec205e0f5!2sWroc%C5%82aw!5e0!3m2!1spl!2spl!4v1700000000000!5m2!1spl!2spl"
width="100%"
height="100%"
style={{ border: 0 }}
allowFullScreen={false}
loading="lazy"
referrerPolicy="no-referrer-when-downgrade"
/>
</div>
</Reveal>
</div>
</div>
</div>
</section>
{/* ─── 3. Szybkie odpowiedzi ────────────────────────────────── */}
<section className="py-24 md:py-32 bg-white border-t border-brand-border/50 w-full">
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<SectionHeader
eyebrow="Zanim napiszesz"
title="Najczęstsze pytania"
align="center"
size="md"
className="mb-16"
/>
<div className="grid grid-cols-1 md:grid-cols-3 gap-8 lg:gap-12">
{[
{
icon: Zap,
title: "Odpowiadamy w 24h",
desc: "Każde zapytanie trafia bezpośrednio do naszego zespołu projektowego. Odpowiemy jeszcze tego samego lub następnego dnia roboczego.",
},
{
icon: MessageSquare,
title: "Bezpłatna wstępna konsultacja",
desc: "Pierwsza rozmowa o projekcie jest zawsze bezpłatna. Chętnie omówimy zakres, harmonogram i wstępne koszty.",
},
{
icon: Shield,
title: "Wrocław i Dolny Śląsk",
desc: "Działamy na terenie Wrocławia i całego Dolnego Śląska. W przypadku większych projektów — również poza regionem.",
},
].map((item, idx) => (
<Reveal key={idx} delay={0.1 * (idx + 1)}>
<div className="group relative flex flex-col items-center text-center p-8 bg-brand-surface rounded-xl border border-brand-border/40">
<TechCorners />
<div className="w-12 h-12 rounded-lg bg-brand-primary/10 flex items-center justify-center mb-6">
<item.icon
className="w-6 h-6 text-brand-primary"
aria-hidden="true"
strokeWidth={1.5}
/>
</div>
<h3 className="text-h4-mobile font-heading font-semibold text-brand-text mb-3">
{item.title}
</h3>
<p className="text-body-mobile text-brand-muted leading-relaxed">{item.desc}</p>
</div>
</Reveal>
))}
</div>
</div>
</section>
</div>
);
}
+1 -1
View File
@@ -259,7 +259,7 @@ export default function HomePage() {
/>
<div className="mb-4">
<TechTag className="inline-flex">{project.type} // {project.year}</TechTag>
<TechTag className="inline-flex">{project.type} {"//"} {project.year}</TechTag>
</div>
<h3 className="mb-3 text-[1.5rem] md:text-[1.75rem] group-hover:text-brand-primary transition-colors text-balance">{fixOrphans(project.title)}</h3>
+2 -2
View File
@@ -1,6 +1,6 @@
import React from "react";
import Link from "next/link";
import { ArrowRight } from "lucide-react";
import { SectionHeader } from "@/components/ui/SectionHeader";
import { Reveal } from "@/components/ui/Reveal";
import { TechCorners } from "@/components/ui/TechCorners";
@@ -57,7 +57,7 @@ export default function RealizacjePage() {
/>
<div className="mb-4">
<TechTag className="inline-flex">{project.type} // {project.year}</TechTag>
<TechTag className="inline-flex">{project.type} {"//"} {project.year}</TechTag>
</div>
<h3 className="mb-3 text-[1.5rem] md:text-[1.75rem] group-hover:text-brand-primary transition-colors text-balance font-heading font-semibold text-brand-text leading-tight">{fixOrphans(project.title)}</h3>
+2 -3
View File
@@ -59,7 +59,7 @@ function MenuItem({ link, text, image, speed, textColor, marqueeBgColor, marquee
const itemRef = useRef<HTMLDivElement>(null);
const marqueeRef = useRef<HTMLDivElement>(null);
const marqueeInnerRef = useRef<HTMLDivElement>(null);
const animationRef = useRef<any>(null);
const animationRef = useRef<gsap.core.Tween | null>(null);
const [repetitions, setRepetitions] = useState(4);
const [isActive, setIsActive] = useState(false);
const router = useRouter();
@@ -67,7 +67,6 @@ function MenuItem({ link, text, image, speed, textColor, marqueeBgColor, marquee
const animationDefaults = { duration: 0.5, ease: 'expo' };
useEffect(() => {
let timer: NodeJS.Timeout;
const calculateRepetitions = () => {
if (!marqueeInnerRef.current) return;
const marqueeContent = marqueeInnerRef.current.querySelector('.marquee__part') as HTMLElement;
@@ -78,7 +77,7 @@ function MenuItem({ link, text, image, speed, textColor, marqueeBgColor, marquee
const needed = Math.ceil(viewportWidth / contentWidth) + 2;
setRepetitions(Math.max(4, needed));
};
timer = setTimeout(calculateRepetitions, 50);
const timer = setTimeout(calculateRepetitions, 50);
window.addEventListener('resize', calculateRepetitions);
return () => {
clearTimeout(timer);
+1
View File
@@ -17,6 +17,7 @@ export const ImageWithSkeleton = forwardRef<HTMLImageElement, ImageWithSkeletonP
{!isLoaded && <Skeleton className="absolute inset-0 w-full h-full" />}
{/* Rzeczywisty obrazek */}
{/* eslint-disable-next-line @next/next/no-img-element */}
<img
{...props}
ref={(node) => {
+246 -28
View File
@@ -8,6 +8,7 @@
"name": "temp_app",
"version": "0.1.0",
"dependencies": {
"@hookform/resolvers": "^5.7.1",
"framer-motion": "^13.0.0",
"gsap": "^3.15.0",
"lucide-react": "^1.30.0",
@@ -15,7 +16,10 @@
"ogl": "^1.0.11",
"puppeteer-core": "^25.5.0",
"react": "^18",
"react-dom": "^18"
"react-dom": "^18",
"react-hook-form": "^7.85.0",
"resend": "^6.18.1",
"zod": "^4.4.3"
},
"devDependencies": {
"@types/node": "^20",
@@ -128,6 +132,30 @@
"url": "https://opencollective.com/eslint"
}
},
"node_modules/@eslint/eslintrc/node_modules/ajv": {
"version": "6.15.0",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.15.0.tgz",
"integrity": "sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==",
"dev": true,
"license": "MIT",
"dependencies": {
"fast-deep-equal": "^3.1.1",
"fast-json-stable-stringify": "^2.0.0",
"json-schema-traverse": "^0.4.1",
"uri-js": "^4.2.2"
},
"funding": {
"type": "github",
"url": "https://github.com/sponsors/epoberezkin"
}
},
"node_modules/@eslint/eslintrc/node_modules/json-schema-traverse": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
"integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
"dev": true,
"license": "MIT"
},
"node_modules/@eslint/js": {
"version": "8.57.1",
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz",
@@ -138,6 +166,116 @@
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
}
},
"node_modules/@hookform/resolvers": {
"version": "5.7.1",
"resolved": "https://registry.npmjs.org/@hookform/resolvers/-/resolvers-5.7.1.tgz",
"integrity": "sha512-8wS/P4UDr5sQDe4nFaV51TVyfDPrWgNIXweqG0Bs9Z5LSuzKLb+RQNPvkN2oHM5SRrJyWrVH/F+LOUcFjUyvwQ==",
"license": "MIT",
"dependencies": {
"@standard-schema/utils": "^0.3.0"
},
"peerDependencies": {
"@sinclair/typebox": ">=0.25.24",
"@standard-schema/spec": "^1.0.0",
"@typeschema/main": ">=0.13.7",
"@vinejs/vine": "^2.0.0 || ^3.0.0 || ^4.0.0",
"ajv": "^8.12.0",
"ajv-errors": "^3.0.0",
"ajv-formats": "^2.1.1",
"arktype": "^2.0.0",
"ata-validator": "^1.2.0",
"class-transformer": ">=0.4.0",
"class-validator": ">=0.12.0",
"computed-types": "^1.0.0",
"effect": "^3.10.3",
"fluentvalidation-ts": "^3.0.0",
"fp-ts": "^2.7.0",
"io-ts": "^2.0.0",
"joi": "^17.0.0",
"nope-validator": ">=0.12.0",
"react-hook-form": "^7.55.0",
"superstruct": ">=0.12.0",
"typanion": "^3.3.2",
"valibot": ">=0.31.0 || ^1.0.0-beta.4 || ^1.0.0-rc",
"vest": ">=3.0.0",
"yup": "^1.0.0",
"zod": "^3.25.0 || ^4.0.0"
},
"peerDependenciesMeta": {
"@sinclair/typebox": {
"optional": true
},
"@standard-schema/spec": {
"optional": true
},
"@typeschema/main": {
"optional": true
},
"@vinejs/vine": {
"optional": true
},
"ajv": {
"optional": true
},
"ajv-errors": {
"optional": true
},
"ajv-formats": {
"optional": true
},
"arktype": {
"optional": true
},
"ata-validator": {
"optional": true
},
"class-transformer": {
"optional": true
},
"class-validator": {
"optional": true
},
"computed-types": {
"optional": true
},
"effect": {
"optional": true
},
"fluentvalidation-ts": {
"optional": true
},
"fp-ts": {
"optional": true
},
"io-ts": {
"optional": true
},
"joi": {
"optional": true
},
"nope-validator": {
"optional": true
},
"superstruct": {
"optional": true
},
"typanion": {
"optional": true
},
"valibot": {
"optional": true
},
"vest": {
"optional": true
},
"yup": {
"optional": true
},
"zod": {
"optional": true
}
}
},
"node_modules/@humanwhocodes/config-array": {
"version": "0.13.0",
"resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz",
@@ -557,6 +695,18 @@
"dev": true,
"license": "MIT"
},
"node_modules/@stablelib/base64": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/@stablelib/base64/-/base64-1.0.1.tgz",
"integrity": "sha512-1bnPQqSxSuc3Ii6MhBysoWCg58j97aUjuCSZrGSmDxNqtytIi0k8utUenAwTZN4V5mXXYGsVUI9zeBqy+jBOSQ==",
"license": "MIT"
},
"node_modules/@standard-schema/utils": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/@standard-schema/utils/-/utils-0.3.0.tgz",
"integrity": "sha512-e7Mew686owMaPJVNNLs55PUvgz371nKgwsc4vxE49zsODpJEnxgxRo2y/OKrqueavXgZNMDVj3DdHFlaSAeU8g==",
"license": "MIT"
},
"node_modules/@swc/counter": {
"version": "0.1.3",
"resolved": "https://registry.npmjs.org/@swc/counter/-/counter-0.1.3.tgz",
@@ -1284,23 +1434,6 @@
"acorn": "^6.0.0 || ^7.0.0 || ^8.0.0"
}
},
"node_modules/ajv": {
"version": "6.15.0",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.15.0.tgz",
"integrity": "sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==",
"dev": true,
"license": "MIT",
"dependencies": {
"fast-deep-equal": "^3.1.1",
"fast-json-stable-stringify": "^2.0.0",
"json-schema-traverse": "^0.4.1",
"uri-js": "^4.2.2"
},
"funding": {
"type": "github",
"url": "https://github.com/sponsors/epoberezkin"
}
},
"node_modules/ansi-regex": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
@@ -1801,6 +1934,15 @@
"devtools-protocol": "*"
}
},
"node_modules/chromium-bidi/node_modules/zod": {
"version": "3.25.76",
"resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz",
"integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==",
"license": "MIT",
"funding": {
"url": "https://github.com/sponsors/colinhacks"
}
},
"node_modules/client-only": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz",
@@ -2743,6 +2885,30 @@
"url": "https://opencollective.com/eslint"
}
},
"node_modules/eslint/node_modules/ajv": {
"version": "6.15.0",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.15.0.tgz",
"integrity": "sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==",
"dev": true,
"license": "MIT",
"dependencies": {
"fast-deep-equal": "^3.1.1",
"fast-json-stable-stringify": "^2.0.0",
"json-schema-traverse": "^0.4.1",
"uri-js": "^4.2.2"
},
"funding": {
"type": "github",
"url": "https://github.com/sponsors/epoberezkin"
}
},
"node_modules/eslint/node_modules/json-schema-traverse": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
"integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
"dev": true,
"license": "MIT"
},
"node_modules/espree": {
"version": "9.6.1",
"resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz",
@@ -2858,6 +3024,12 @@
"dev": true,
"license": "MIT"
},
"node_modules/fast-sha256": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/fast-sha256/-/fast-sha256-1.3.0.tgz",
"integrity": "sha512-n11RGP/lrWEFI/bWdygLxhI+pVeo1ZYIVwvvPkW7azl/rOy+F3HYRZ2K5zeE9mmkhQppyv9sQFx0JM9UabnpPQ==",
"license": "Unlicense"
},
"node_modules/fastq": {
"version": "1.20.1",
"resolved": "https://registry.npmjs.org/fastq/-/fastq-1.20.1.tgz",
@@ -3997,13 +4169,6 @@
"dev": true,
"license": "MIT"
},
"node_modules/json-schema-traverse": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
"integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
"dev": true,
"license": "MIT"
},
"node_modules/json-stable-stringify-without-jsonify": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz",
@@ -4763,6 +4928,12 @@
"node": ">= 0.4"
}
},
"node_modules/postal-mime": {
"version": "2.7.5",
"resolved": "https://registry.npmjs.org/postal-mime/-/postal-mime-2.7.5.tgz",
"integrity": "sha512-GNEXKvWFQnbgO5NlrGzVa0FmWzBZ24PersAWErttSg1Hjpf0ATxTwS5DOMGaOpTG6bUh5cTr7xi0jAD942wCJA==",
"license": "MIT-0"
},
"node_modules/postcss": {
"version": "8.5.26",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.26.tgz",
@@ -5043,6 +5214,22 @@
"react": "^18.3.1"
}
},
"node_modules/react-hook-form": {
"version": "7.85.0",
"resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.85.0.tgz",
"integrity": "sha512-U2MTriFXnclmV4rOE20p2DcRFv5WEg3FIcBFOKcOLFHDVvGIMPvLTkTWefUsonmlaVy23khVDxDWym6uJVGOzw==",
"license": "MIT",
"engines": {
"node": ">=18.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/react-hook-form"
},
"peerDependencies": {
"react": "^16.8.0 || ^17 || ^18 || ^19"
}
},
"node_modules/react-is": {
"version": "16.13.1",
"resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
@@ -5117,6 +5304,27 @@
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/resend": {
"version": "6.18.1",
"resolved": "https://registry.npmjs.org/resend/-/resend-6.18.1.tgz",
"integrity": "sha512-XN8XIaDdKF+ziSQ3K23ndUcyhP7U3ze2gky6SPgYkuAOq54mH4Wdhwm7QylEQ3zlz0NzdX7/l1AgmJUZbdPI/Q==",
"license": "MIT",
"dependencies": {
"postal-mime": "2.7.5",
"standardwebhooks": "1.0.0"
},
"engines": {
"node": ">=20"
},
"peerDependencies": {
"@react-email/render": "*"
},
"peerDependenciesMeta": {
"@react-email/render": {
"optional": true
}
}
},
"node_modules/resolve": {
"version": "2.0.0-next.7",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.7.tgz",
@@ -5489,6 +5697,16 @@
"dev": true,
"license": "MIT"
},
"node_modules/standardwebhooks": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/standardwebhooks/-/standardwebhooks-1.0.0.tgz",
"integrity": "sha512-BbHGOQK9olHPMvQNHWul6MYlrRTAOKn03rOe4A8O3CLWhNf4YHBqq2HJKKC+sfqpxiBY52pNeesD6jIiLDz8jg==",
"license": "MIT",
"dependencies": {
"@stablelib/base64": "^1.0.0",
"fast-sha256": "^1.3.0"
}
},
"node_modules/stop-iteration-iterator": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.1.0.tgz",
@@ -6554,9 +6772,9 @@
}
},
"node_modules/zod": {
"version": "3.25.76",
"resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz",
"integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==",
"version": "4.4.3",
"resolved": "https://registry.npmjs.org/zod/-/zod-4.4.3.tgz",
"integrity": "sha512-ytENFjIJFl2UwYglde2jchW2Hwm4GJFLDiSXWdTrJQBIN9Fcyp7n4DhxJEiWNAJMV1/BqWfW/kkg71UDcHJyTQ==",
"license": "MIT",
"funding": {
"url": "https://github.com/sponsors/colinhacks"
+5 -1
View File
@@ -9,6 +9,7 @@
"lint": "next lint"
},
"dependencies": {
"@hookform/resolvers": "^5.7.1",
"framer-motion": "^13.0.0",
"gsap": "^3.15.0",
"lucide-react": "^1.30.0",
@@ -16,7 +17,10 @@
"ogl": "^1.0.11",
"puppeteer-core": "^25.5.0",
"react": "^18",
"react-dom": "^18"
"react-dom": "^18",
"react-hook-form": "^7.85.0",
"resend": "^6.18.1",
"zod": "^4.4.3"
},
"devDependencies": {
"@types/node": "^20",