feat(MED-122): don't use math.random on ssr
This commit is contained in:
@@ -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
|
||||
}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user