fix: linting cleanup, TS errors, mobile cookie banner and hero max-width

This commit is contained in:
MichalC
2026-08-01 12:27:14 +02:00
parent 02cb49e180
commit 88cb4c516d
49 changed files with 167 additions and 125 deletions
+6 -3
View File
@@ -2,7 +2,7 @@
import { useState, useEffect } from "react";
import Link from "next/link";
import { User, ShoppingBag, Menu, Phone, Wrench } from "lucide-react";
import { ShoppingBag, Menu, Phone, Wrench } from "lucide-react";
import { NavDropdown } from "./NavDropdown";
import { GlobalSearch } from "./GlobalSearch";
import { MobileMenu } from "./MobileMenu";
@@ -20,7 +20,7 @@ export function Header() {
const cartItems = useCartStore((state) => state.items);
useEffect(() => {
setMounted(true);
const t = setTimeout(() => setMounted(true), 0);
const handleScroll = () => {
if (window.scrollY > 40) {
setIsScrolled(true);
@@ -30,7 +30,10 @@ export function Header() {
};
window.addEventListener("scroll", handleScroll);
return () => window.removeEventListener("scroll", handleScroll);
return () => {
window.removeEventListener("scroll", handleScroll);
clearTimeout(t);
};
}, []);
const cartCount = mounted