diff --git a/src/components/layout/sidebar.tsx b/src/components/layout/sidebar.tsx
index f01d2cb..bf058ff 100644
--- a/src/components/layout/sidebar.tsx
+++ b/src/components/layout/sidebar.tsx
@@ -2,7 +2,6 @@
import Link from "next/link";
import { usePathname } from "next/navigation";
-import { useEffect } from "react";
import { cn } from "@/lib/utils";
import { useAuth } from "@/hooks/use-auth";
import { useTotalUnread } from "@/hooks/use-total-unread";
@@ -15,7 +14,6 @@ import {
Zap,
Settings,
LogOut,
- X,
} from "lucide-react";
const navItems = [
@@ -31,177 +29,115 @@ const bottomNavItems = [
{ href: "/settings", label: "Settings", icon: Settings },
];
-interface SidebarProps {
- /** Controlled on mobile by the Header's hamburger button. Ignored on lg+. */
- open?: boolean;
- onClose?: () => void;
-}
-
-export function Sidebar({ open = false, onClose }: SidebarProps) {
+export function Sidebar() {
const pathname = usePathname();
const { profile, signOut } = useAuth();
const totalUnread = useTotalUnread();
- // Close the drawer when route changes — users opened it to navigate,
- // so once they pick a destination the drawer should get out of the way.
- useEffect(() => {
- onClose?.();
- // Only pathname drives this — onClose identity doesn't need to re-run it.
- // eslint-disable-next-line react-hooks/exhaustive-deps
- }, [pathname]);
-
- // Lock body scroll and allow Escape to close while the drawer is open on
- // mobile. No-ops on desktop because the sidebar isn't positioned there.
- useEffect(() => {
- if (!open) return;
- const prev = document.body.style.overflow;
- document.body.style.overflow = "hidden";
- const onKey = (e: KeyboardEvent) => {
- if (e.key === "Escape") onClose?.();
- };
- window.addEventListener("keydown", onKey);
- return () => {
- document.body.style.overflow = prev;
- window.removeEventListener("keydown", onKey);
- };
- }, [open, onClose]);
-
return (
- <>
- {/* Backdrop — only exists on mobile and only when open. Clicking
- it closes the drawer. Hidden from lg+ since the sidebar is
- part of the main flex row there. */}
-
+