From 49d1c37cff28cc24df99553df2c27af23e5643f4 Mon Sep 17 00:00:00 2001 From: Kuba Pyla Date: Wed, 20 May 2026 04:17:33 +0200 Subject: [PATCH] rework components v3 --- src/components/Header.tsx | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/src/components/Header.tsx b/src/components/Header.tsx index 80c7665..300d0f0 100644 --- a/src/components/Header.tsx +++ b/src/components/Header.tsx @@ -66,10 +66,32 @@ export function Header() { return false; } + function handleLogoClick(event: React.MouseEvent) { + if (pathname !== '/pl') { + return; + } + + event.preventDefault(); + setIsOpen(false); + + if (window.location.hash) { + window.history.replaceState(null, '', pathname); + } + + window.scrollTo({top: 0, left: 0}); + setActiveSection(null); + } + return (
- +