(null);
const { country, currency, countries } = useStore();
- const router = useRouter();
const { isCountryNavigating, handleCountrySelect } = useCountrySwitch({
currentCountry: country,
onBeforeNavigate: () => setOpen(false),
@@ -98,14 +96,6 @@ export function MobileMenu({ rootCategories, basePath }: MobileMenuProps) {
}
};
- const handleNavigate = (href: string) => {
- setOpen(false);
- router.push(href);
- };
-
- // Flatten root categories: show their children directly instead of taxonomy names
- const menuCategories = rootCategories.flatMap((root) => root.children ?? []);
-
// Shared link style
const linkClass =
"text-left text-gray-700 hover:text-gray-900 hover:bg-gray-50 rounded-lg px-3 py-2.5 text-base transition-colors";
@@ -225,21 +215,21 @@ export function MobileMenu({ rootCategories, basePath }: MobileMenuProps) {
}`}
>
{/* Footer: Country switcher (mobile + tablet) + Account (mobile only) */}
@@ -342,33 +330,27 @@ export function MobileMenu({ rootCategories, basePath }: MobileMenuProps) {
) : (
-
+
),
)}
{/* "View all" at the bottom */}
-
+
);
diff --git a/src/components/products/filters/ProductFilters.tsx b/src/components/products/filters/ProductFilters.tsx
index 32f76917..268e50e3 100644
--- a/src/components/products/filters/ProductFilters.tsx
+++ b/src/components/products/filters/ProductFilters.tsx
@@ -131,20 +131,21 @@ export const FilterBar = memo(function FilterBar({
const activeSortBy = activeFilters.sortBy || filtersData?.default_sort;
- if (filtersLoading) {
- return (
-
- );
+ if (!filtersData) {
+ if (filtersLoading) {
+ return (
+
+ );
+ }
+ return null;
}
- if (!filtersData) return null;
-
const availabilityFilter = filtersData.filters.find(
(f) => f.type === "availability",
) as AvailabilityFilter | undefined;