From f062e23dbac814caac85b97ff571590927bbad7b Mon Sep 17 00:00:00 2001 From: oskar Date: Fri, 31 Jul 2026 15:03:37 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20logo=20w=20stopce=20nawiguje=20na=20stro?= =?UTF-8?q?n=C4=99=20g=C5=82=C3=B3wn=C4=85=20z=20podstron?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Logo miało href="#", więc na /privacy i /platforma klikało w pustkę — ta sama usterka co wcześniej w linkach "Oferta"/"Kontakt" w tym samym pliku. Cel to teraz "/", a onClick przechwytuje klik na samej stronie głównej i przewija płynnie do góry, zamiast przeładowywać stronę. Co-Authored-By: Claude Opus 5 (1M context) --- src/components/Footer.tsx | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/components/Footer.tsx b/src/components/Footer.tsx index 125aa93..ec957b3 100644 --- a/src/components/Footer.tsx +++ b/src/components/Footer.tsx @@ -2,13 +2,24 @@ import React from 'react'; const Footer = () => { const currentYear = new Date().getFullYear(); - + + // Same reasoning as the /#section nav links below: this footer is shared with + // /privacy and /platforma, so the logo needs a real href to get home from + // there. On the homepage that href would mean a full reload, so intercept the + // click and scroll to the top instead. + const handleLogoClick = (e: React.MouseEvent) => { + if (window.location.pathname !== '/') return; + e.preventDefault(); + window.scrollTo({ top: 0, behavior: 'smooth' }); + }; + + return (