Skip to content

Commit c191f15

Browse files
committed
fix(sidebar): hoist skeleton section counts to module constant
1 parent 03739d0 commit c191f15

File tree

1 file changed

+3
-1
lines changed
  • apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/settings-sidebar

1 file changed

+3
-1
lines changed

apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/settings-sidebar/settings-sidebar.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ import { useSuperUserStatus } from '@/hooks/queries/user-profile'
2424
import { usePermissionConfig } from '@/hooks/use-permission-config'
2525
import { useSettingsNavigation } from '@/hooks/use-settings-navigation'
2626

27+
const SKELETON_SECTIONS = [3, 2, 2] as const
28+
2729
interface SettingsSidebarProps {
2830
isCollapsed?: boolean
2931
showCollapsedContent?: boolean
@@ -208,7 +210,7 @@ export function SettingsSidebar({
208210
{sessionLoading || orgsLoading ? (
209211
isCollapsed ? (
210212
<>
211-
{[3, 2, 2].map((count, sectionIdx) => (
213+
{SKELETON_SECTIONS.map((count, sectionIdx) => (
212214
<div key={sectionIdx} className='flex flex-col gap-[2px] px-[8px]'>
213215
{Array.from({ length: count }, (_, i) => (
214216
<div key={i} className='mx-[2px] flex h-[30px] items-center px-[8px]'>

0 commit comments

Comments
 (0)