Merge pull request #1413 from mvanhorn/fix/1359-shared-isMobile-hook

fix: use shared useIsMobile (768px) in SidebarSlideOutPanel (#1359)
This commit is contained in:
Rohan Verma 2026-05-20 01:32:04 -07:00 committed by GitHub
commit 4774105015
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2,7 +2,7 @@
import { AnimatePresence, motion } from "motion/react";
import { useCallback, useEffect } from "react";
import { useMediaQuery } from "@/hooks/use-media-query";
import { useIsMobile } from "@/hooks/use-mobile";
import { SLIDEOUT_PANEL_OPENED_EVENT } from "@/lib/layout-events";
interface SidebarSlideOutPanelProps {
@ -28,7 +28,7 @@ export function SidebarSlideOutPanel({
width = 360,
children,
}: SidebarSlideOutPanelProps) {
const isMobile = !useMediaQuery("(min-width: 640px)");
const isMobile = useIsMobile();
useEffect(() => {
if (open) {