Skip to content

Commit f73ccea

Browse files
committed
skelly in workspace header
1 parent 7ffb247 commit f73ccea

File tree

2 files changed

+32
-23
lines changed

2 files changed

+32
-23
lines changed

apps/sim/app/workspace/[workspaceId]/settings/[section]/settings.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ const WhitelabelingSettings = dynamic(
161161
import('@/ee/whitelabeling/components/whitelabeling-settings').then(
162162
(m) => m.WhitelabelingSettings
163163
),
164-
{ loading: () => <SettingsSectionSkeleton /> }
164+
{ loading: () => <SettingsSectionSkeleton />, ssr: false }
165165
)
166166

167167
interface SettingsPageProps {

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

Lines changed: 31 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import {
1717
ModalFooter,
1818
ModalHeader,
1919
Plus,
20+
Skeleton,
2021
UserPlus,
2122
} from '@/components/emcn'
2223
import { getDisplayPlanName, isFree } from '@/lib/billing/plan-helpers'
@@ -356,14 +357,16 @@ export function WorkspaceHeader({
356357
}
357358
}}
358359
>
359-
<div
360-
className='flex h-[20px] w-[20px] flex-shrink-0 items-center justify-center rounded-sm font-medium text-caption text-white leading-none'
361-
style={{
362-
backgroundColor: activeWorkspaceFull?.color || 'var(--brand-accent)',
363-
}}
364-
>
365-
{workspaceInitial}
366-
</div>
360+
{activeWorkspaceFull ? (
361+
<div
362+
className='flex h-[20px] w-[20px] flex-shrink-0 items-center justify-center rounded-sm font-medium text-caption text-white leading-none'
363+
style={{ backgroundColor: activeWorkspaceFull.color }}
364+
>
365+
{workspaceInitial}
366+
</div>
367+
) : (
368+
<Skeleton className='h-[20px] w-[20px] flex-shrink-0 rounded-sm' />
369+
)}
367370
{!isCollapsed && (
368371
<>
369372
<span className='min-w-0 flex-1 truncate text-left font-base text-[var(--text-primary)] text-sm'>
@@ -400,14 +403,16 @@ export function WorkspaceHeader({
400403
) : (
401404
<>
402405
<div className='flex items-center gap-2 px-0.5 py-0.5'>
403-
<div
404-
className='flex h-[32px] w-[32px] flex-shrink-0 items-center justify-center rounded-md font-medium text-caption text-white'
405-
style={{
406-
backgroundColor: activeWorkspaceFull?.color || 'var(--brand-accent)',
407-
}}
408-
>
409-
{workspaceInitial}
410-
</div>
406+
{activeWorkspaceFull ? (
407+
<div
408+
className='flex h-[32px] w-[32px] flex-shrink-0 items-center justify-center rounded-md font-medium text-caption text-white'
409+
style={{ backgroundColor: activeWorkspaceFull.color }}
410+
>
411+
{workspaceInitial}
412+
</div>
413+
) : (
414+
<Skeleton className='h-[32px] w-[32px] flex-shrink-0 rounded-md' />
415+
)}
411416
<div className='flex min-w-0 flex-1 flex-col'>
412417
<span className='truncate font-medium text-[var(--text-primary)] text-small'>
413418
{activeWorkspace?.name || 'Loading...'}
@@ -580,12 +585,16 @@ export function WorkspaceHeader({
580585
title={activeWorkspace?.name || 'Loading...'}
581586
disabled
582587
>
583-
<div
584-
className='flex h-[20px] w-[20px] flex-shrink-0 items-center justify-center rounded-sm font-medium text-caption text-white leading-none'
585-
style={{ backgroundColor: activeWorkspaceFull?.color || 'var(--brand-accent)' }}
586-
>
587-
{workspaceInitial}
588-
</div>
588+
{activeWorkspaceFull ? (
589+
<div
590+
className='flex h-[20px] w-[20px] flex-shrink-0 items-center justify-center rounded-sm font-medium text-caption text-white leading-none'
591+
style={{ backgroundColor: activeWorkspaceFull.color }}
592+
>
593+
{workspaceInitial}
594+
</div>
595+
) : (
596+
<Skeleton className='h-[20px] w-[20px] flex-shrink-0 rounded-sm' />
597+
)}
589598
{!isCollapsed && (
590599
<>
591600
<span className='min-w-0 flex-1 truncate text-left font-base text-[var(--text-primary)] text-sm'>

0 commit comments

Comments
 (0)