Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions apps/web/src/components/ui/sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,7 @@ function SidebarProvider({
);
}

/** The rail's width restore and drag refresh key on this value. */
function useResolvedSidebarResizable({
function resolveSidebarResizable({
collapsible,
isMobile,
resizable,
Expand All @@ -187,7 +186,6 @@ function useResolvedSidebarResizable({
isMobile: boolean;
resizable: boolean | SidebarResizableOptions;
}): SidebarResolvedResizableOptions | null {
"use memo";
if (isMobile || collapsible === "none" || !resizable) {
return null;
}
Expand Down Expand Up @@ -217,7 +215,8 @@ function Sidebar({
resizable?: boolean | SidebarResizableOptions;
}) {
const { isMobile, state, openMobile, setOpenMobile, setMobileSheetElement } = useSidebar();
const resolvedResizable = useResolvedSidebarResizable({ collapsible, isMobile, resizable });
// The rail's width restore and drag refresh key on this value.
const resolvedResizable = resolveSidebarResizable({ collapsible, isMobile, resizable });
const instanceContextValue: SidebarInstanceContextProps = { side, resizable: resolvedResizable };

if (collapsible === "none") {
Expand Down
Loading