From b422d079fb7bef6e63730dc64cb0ea59b89c98e2 Mon Sep 17 00:00:00 2001 From: Emil Gulamov <125820963+mearashadowfax@users.noreply.github.com> Date: Sat, 24 Feb 2024 23:59:08 +0400 Subject: [PATCH] Refactor event handlers to remove unused event parameter In several areas of the code, event handlers had an unused event parameter. This change removes these unused parameters to improve the code's readability and maintainability. Specifically, the changes were made in the "Navbar.astro", "[...slug].astro", and "services.astro" components. --- src/components/sections/Navbar.astro | 2 +- .../ui/banners/AnnouncementBanner.astro | 87 ++++++++++--------- src/pages/products/[...slug].astro | 2 +- src/pages/services.astro | 2 +- 4 files changed, 47 insertions(+), 46 deletions(-) diff --git a/src/components/sections/Navbar.astro b/src/components/sections/Navbar.astro index 44e6297..027269f 100644 --- a/src/components/sections/Navbar.astro +++ b/src/components/sections/Navbar.astro @@ -210,7 +210,7 @@ import { navBarLinks } from "../../utils/navigation.ts"; window .matchMedia("(prefers-color-scheme: dark)") - .addEventListener("change", (e) => { + .addEventListener("change", () => { if (HSThemeAppearance.getOriginalAppearance() === "auto") { HSThemeAppearance.setAppearance("auto", false); } diff --git a/src/components/ui/banners/AnnouncementBanner.astro b/src/components/ui/banners/AnnouncementBanner.astro index b53420f..a63393a 100644 --- a/src/components/ui/banners/AnnouncementBanner.astro +++ b/src/components/ui/banners/AnnouncementBanner.astro @@ -10,28 +10,46 @@ interface Props { --- -
-
-
-

+

+
+

+ {title} +

+ + {btnTitle} + + +
+
-
-
diff --git a/src/pages/products/[...slug].astro b/src/pages/products/[...slug].astro index 362be84..3ead72a 100644 --- a/src/pages/products/[...slug].astro +++ b/src/pages/products/[...slug].astro @@ -197,7 +197,7 @@ const { product } = Astro.props;