diff --git a/.cursor/rules/mobile-first-ui-ux.mdc b/.cursor/rules/mobile-first-ui-ux.mdc new file mode 100644 index 00000000..3dca9096 --- /dev/null +++ b/.cursor/rules/mobile-first-ui-ux.mdc @@ -0,0 +1,3 @@ +--- +alwaysApply: true +--- diff --git a/src/components/Bookmarks.tsx b/src/components/Bookmarks.tsx index dd47843d..d15ee3f3 100644 --- a/src/components/Bookmarks.tsx +++ b/src/components/Bookmarks.tsx @@ -90,6 +90,14 @@ const Bookmarks: React.FC = ({ relayPool, onLogout }) => { setHighlightVisibility } = useBookmarksUI({ settings }) + // Close sidebar on mobile when route changes (e.g., clicking on blog posts in Explore) + useEffect(() => { + if (isMobile && isSidebarOpen) { + toggleSidebar() + } + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [location.pathname]) + const { bookmarks, bookmarksLoading,