From 46f42378ad653a006e2cbc22b1944d8f509af811 Mon Sep 17 00:00:00 2001 From: Mert <223351406+thisismert@users.noreply.github.com> Date: Sun, 19 Oct 2025 13:18:35 +0300 Subject: [PATCH] fix(components): replace useMemo with useState for sidebar width calculation --- apps/v4/registry/new-york-v4/ui/sidebar.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/apps/v4/registry/new-york-v4/ui/sidebar.tsx b/apps/v4/registry/new-york-v4/ui/sidebar.tsx index 9daf24003b4..e634c3355da 100644 --- a/apps/v4/registry/new-york-v4/ui/sidebar.tsx +++ b/apps/v4/registry/new-york-v4/ui/sidebar.tsx @@ -607,9 +607,7 @@ function SidebarMenuSkeleton({ showIcon?: boolean }) { // Random width between 50 to 90%. - const width = React.useMemo(() => { - return `${Math.floor(Math.random() * 40) + 50}%` - }, []) + const [width] = React.useState(() => `${Math.floor(Math.random() * 40) + 50}%`) return (