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