diff --git a/apps/web/components/filter/index.tsx b/apps/web/components/filter/index.tsx index e769ff771..5a0ddd371 100644 --- a/apps/web/components/filter/index.tsx +++ b/apps/web/components/filter/index.tsx @@ -1,21 +1,75 @@ +"use client"; + import { twMerge } from "tailwind-merge"; import SearchFilter from "./search"; import SearchToggles from "./toggles"; +import { useEffect, useState } from "react"; +import { + AdjustmentsHorizontalIcon, + XMarkIcon, +} from "@heroicons/react/24/solid"; export default function Filter() { + const [drawerVisible, setDrawerVisible] = useState(false); + + useEffect(() => { + if (drawerVisible) { + document.body.style.overflow = "hidden"; + } else { + document.body.style.overflow = ""; + } + }, [drawerVisible]); + + function openDrawer() { + setDrawerVisible(true); + } + + function closeDrawer() { + setDrawerVisible(false); + } + return ( - <> +