@@ -627,19 +627,36 @@ function EditCollection() {
627627 overflow : 'hidden' ,
628628 background : 'var(--color-bg-input)'
629629 } } >
630- { fields . map ( ( field , index ) => (
631- < FieldRow
632- key = { field . _id }
633- field = { field }
634- index = { index }
635- depth = { 1 }
636- collections = { collections }
637- collectionsLoading = { collectionsLoading }
638- collectionsError = { collectionsError }
639- onChange = { handleFieldChange }
640- onRemove = { removeField }
641- />
642- ) ) }
630+ { collectionsLoading ? (
631+ < div className = "flex flex-col gap-0" >
632+ { [ 1 , 2 , 3 ] . map ( i => (
633+ < div key = { i } className = "flex items-center gap-3 p-2 px-3 border-b border-[var(--color-border)] opacity-60" >
634+ < div className = "w-5 flex-shrink-0" > </ div >
635+ < div className = "flex-[3] h-9 bg-[var(--color-bg-card)] animate-pulse rounded" > </ div >
636+ < div className = "flex-[2] h-9 bg-[var(--color-bg-card)] animate-pulse rounded" > </ div >
637+ < div className = "flex-[3] flex items-center gap-2" >
638+ < div className = "w-5 h-5 bg-[var(--color-bg-card)] animate-pulse rounded" > </ div >
639+ < div className = "w-16 h-4 bg-[var(--color-bg-card)] animate-pulse rounded" > </ div >
640+ </ div >
641+ < div className = "w-9 h-9 bg-[var(--color-bg-card)] animate-pulse rounded" > </ div >
642+ </ div >
643+ ) ) }
644+ </ div >
645+ ) : (
646+ fields . map ( ( field , index ) => (
647+ < FieldRow
648+ key = { field . _id }
649+ field = { field }
650+ index = { index }
651+ depth = { 1 }
652+ collections = { collections }
653+ collectionsLoading = { collectionsLoading }
654+ collectionsError = { collectionsError }
655+ onChange = { handleFieldChange }
656+ onRemove = { removeField }
657+ />
658+ ) )
659+ ) }
643660 </ div >
644661
645662 < div style = { { marginTop : '10px' , color : 'var(--color-text-muted)' , fontSize : '0.85rem' } } >
0 commit comments