feat(MED-122): don't use math.random on ssr

This commit is contained in:
2025-07-17 10:01:32 +03:00
parent 7b71da3825
commit 1d0808018b

View File

@@ -674,11 +674,6 @@ const SidebarMenuSkeleton: React.FC<
showIcon?: boolean;
}
> = ({ className, showIcon = false, ...props }) => {
// Random width between 50 to 90%.
const width = React.useMemo(() => {
return `${Math.floor(Math.random() * 40) + 50}%`;
}, []);
return (
<div
data-sidebar="menu-skeleton"
@@ -696,7 +691,7 @@ const SidebarMenuSkeleton: React.FC<
data-sidebar="menu-skeleton-text"
style={
{
'--skeleton-width': width,
'--skeleton-width': '70%',
} as React.CSSProperties
}
/>