{/* Mobile Menu Header */}
-
MENU
+
+ MENU
+
@@ -311,12 +330,7 @@ export default function Header() {
{/* Search Drawer */}
- {search && (
-
setSearch(false)}
- />
- )}
+ {search && setSearch(false)} />}
>
);
-}
\ No newline at end of file
+}
diff --git a/src/components/ShopMenu/ShopMenu.jsx b/src/components/ShopMenu/ShopMenu.jsx
index b21d92cd..850cb54c 100644
--- a/src/components/ShopMenu/ShopMenu.jsx
+++ b/src/components/ShopMenu/ShopMenu.jsx
@@ -1,9 +1,5 @@
import React, { useState, useRef, useEffect } from 'react';
-import {
- ChevronDown,
- ChevronUp,
- ArrowRight,
-} from 'lucide-react';
+import { ChevronDown, ChevronUp, ArrowRight } from 'lucide-react';
const ShopMenu = ({ shopOpen, setShopOpen, onShopClick, onShopKeyDown }) => {
const [focusedIndex, setFocusedIndex] = useState(-1);
@@ -13,7 +9,10 @@ const ShopMenu = ({ shopOpen, setShopOpen, onShopClick, onShopKeyDown }) => {
// Close shop menu when clicking outside
useEffect(() => {
const handleClickOutside = (event) => {
- if (shopButtonRef.current && !shopButtonRef.current.contains(event.target)) {
+ if (
+ shopButtonRef.current &&
+ !shopButtonRef.current.contains(event.target)
+ ) {
setShopOpen(false);
setFocusedIndex(-1);
}
@@ -38,7 +37,7 @@ const ShopMenu = ({ shopOpen, setShopOpen, onShopClick, onShopKeyDown }) => {
break;
case 'ArrowDown':
event.preventDefault();
- setFocusedIndex(prev => {
+ setFocusedIndex((prev) => {
const nextIndex = prev + 1;
const totalItems = menuItemsRef.current.length;
return nextIndex >= totalItems ? 0 : nextIndex;
@@ -46,7 +45,7 @@ const ShopMenu = ({ shopOpen, setShopOpen, onShopClick, onShopKeyDown }) => {
break;
case 'ArrowUp':
event.preventDefault();
- setFocusedIndex(prev => {
+ setFocusedIndex((prev) => {
const prevIndex = prev - 1;
const totalItems = menuItemsRef.current.length;
return prevIndex < 0 ? totalItems - 1 : prevIndex;
@@ -54,23 +53,25 @@ const ShopMenu = ({ shopOpen, setShopOpen, onShopClick, onShopKeyDown }) => {
break;
case 'ArrowRight':
event.preventDefault();
- setFocusedIndex(prev => {
+ setFocusedIndex((prev) => {
// Move to next column (every 4 items per column)
const itemsPerColumn = 4;
const currentColumn = Math.floor(prev / itemsPerColumn);
const nextColumn = (currentColumn + 1) % 8; // 8 total columns
- const nextIndex = nextColumn * itemsPerColumn + (prev % itemsPerColumn);
+ const nextIndex =
+ nextColumn * itemsPerColumn + (prev % itemsPerColumn);
return nextIndex < menuItemsRef.current.length ? nextIndex : prev;
});
break;
case 'ArrowLeft':
event.preventDefault();
- setFocusedIndex(prev => {
+ setFocusedIndex((prev) => {
// Move to previous column (every 4 items per column)
const itemsPerColumn = 4;
const currentColumn = Math.floor(prev / itemsPerColumn);
const prevColumn = currentColumn === 0 ? 7 : currentColumn - 1; // 8 total columns
- const prevIndex = prevColumn * itemsPerColumn + (prev % itemsPerColumn);
+ const prevIndex =
+ prevColumn * itemsPerColumn + (prev % itemsPerColumn);
return prevIndex < menuItemsRef.current.length ? prevIndex : prev;
});
break;
@@ -110,15 +111,15 @@ const ShopMenu = ({ shopOpen, setShopOpen, onShopClick, onShopKeyDown }) => {
// Helper function to create menu item with accessibility
const createMenuItem = (collectionName, displayName, index) => (
-