diff --git a/apps/storefront/src/components/header/mobile-search.tsx b/apps/storefront/src/components/header/mobile-search.tsx index 829c082..c5eae07 100644 --- a/apps/storefront/src/components/header/mobile-search.tsx +++ b/apps/storefront/src/components/header/mobile-search.tsx @@ -1,7 +1,7 @@ "use client"; import { Search } from "lucide-react"; -import { useParams, usePathname } from "next/navigation"; +import { usePathname } from "next/navigation"; import { useTranslations } from "next-intl"; import { useEffect, useState } from "react"; @@ -14,12 +14,11 @@ export const MobileSearch = () => { const t = useTranslations("search"); const pathname = usePathname(); - const params = useParams(); const [isOpen, setIsOpen] = useState(false); useEffect(() => { setIsOpen(false); - }, [pathname, params]); + }, [pathname]); return ( <> @@ -38,7 +37,7 @@ export const MobileSearch = () => { aria-label={t("search-label")} modal={true} > - + diff --git a/packages/ui/src/components/sheet.tsx b/packages/ui/src/components/sheet.tsx index 7a31ab7..7166db9 100644 --- a/packages/ui/src/components/sheet.tsx +++ b/packages/ui/src/components/sheet.tsx @@ -54,12 +54,14 @@ const sheetVariants = cva( interface SheetContentProps extends React.ComponentPropsWithoutRef, - VariantProps {} + VariantProps { + closeClassName?: string; +} const SheetContent = React.forwardRef< React.ElementRef, SheetContentProps ->(({ side = "right", className, children, ...props }, ref) => ( +>(({ side = "right", className, closeClassName, children, ...props }, ref) => ( {children} - + Close