fix category active item

This commit is contained in:
hamid zarghami
2026-06-23 14:32:32 +03:30
parent 201bb768c9
commit 62a255cb70
2 changed files with 4 additions and 18 deletions
@@ -4,9 +4,9 @@ import { Category } from "@/app/[name]/(Main)/types/Types";
import CategoryItemRenderer from "@/components/listview/CategoryItemRenderer";
import CategorySmallItemRenderer from "@/components/listview/CategorySmallItemRenderer";
import HorizontalScrollView from "@/components/listview/HorizontalScrollView";
import { GLASS_SURFACE_DISABLED, GLASS_SURFACE_SELECTED } from "@/lib/styles/glassSurface";
import clsx from "clsx";
import { usePathname } from "next/navigation";
import { GLASS_SURFACE_DISABLED, GLASS_SURFACE_SELECTED } from "@/lib/styles/glassSurface";
/** TODO: remove when backend sends avatarRenderMode */
const COLORED_SVG_RESTAURANT_SLUGS = new Set(["havasone"]);
@@ -114,11 +114,7 @@ const CategoryScroll = ({ categories, selectedCategory, onSelect, variant = "lar
return (
<Renderer
key={item.id}
className={clsx(
isDisabled && GLASS_SURFACE_DISABLED,
isDisabled && "cursor-not-allowed",
isSelected && !isDisabled && GLASS_SURFACE_SELECTED,
)}
className={clsx(!isSelected && GLASS_SURFACE_DISABLED, isDisabled && "cursor-not-allowed", isSelected && !isDisabled && GLASS_SURFACE_SELECTED)}
onClick={isDisabled ? undefined : handleSelect(item.id)}
aria-disabled={isDisabled}
>