@@ -9,7 +9,8 @@ import { useCreateGroup, useModifyGroup, useGetInbounds } from '@/service/api'
99import { toast } from 'sonner'
1010import { Command , CommandEmpty , CommandGroup , CommandInput , CommandItem } from '@/components/ui/command'
1111import { Badge } from '@/components/ui/badge'
12- import { Pencil , Loader2 , X , Group } from 'lucide-react'
12+ import { Skeleton } from '@/components/ui/skeleton'
13+ import { Pencil , X , Group } from 'lucide-react'
1314import { cn } from '@/lib/utils'
1415import { queryClient } from '@/utils/query-client'
1516import useDynamicErrorHandler from '@/hooks/use-dynamic-errors.ts'
@@ -133,12 +134,16 @@ export default function GroupModal({ isDialogOpen, onOpenChange, form, editingGr
133134 ) }
134135 < Command className = "mb-3 rounded-md border" >
135136 < CommandInput placeholder = { t ( 'searchInbounds' ) } disabled = { isLoadingInbounds } />
136- < CommandEmpty > { isLoadingInbounds ? t ( 'loading' , { defaultValue : 'Loading...' } ) : t ( 'noInboundsFound' ) } </ CommandEmpty >
137+ { ! isLoadingInbounds && < CommandEmpty > { t ( 'noInboundsFound' ) } </ CommandEmpty > }
137138 < CommandGroup dir = "ltr" className = "max-h-40 overflow-auto" >
138139 { isLoadingInbounds ? (
139- < div className = "flex items-center justify-center gap-2 px-2 py-3 text-xs text-muted-foreground" >
140- < Loader2 className = "h-3 w-3 animate-spin" />
141- < span > { t ( 'loading' , { defaultValue : 'Loading...' } ) } </ span >
140+ < div className = "space-y-2 px-2 py-3" >
141+ { Array . from ( { length : 4 } ) . map ( ( _ , index ) => (
142+ < div key = { index } className = "flex items-center gap-2" >
143+ < Skeleton className = "h-4 w-4 rounded-sm" />
144+ < Skeleton className = "h-4 w-full max-w-[220px]" />
145+ </ div >
146+ ) ) }
142147 </ div >
143148 ) : (
144149 inbounds ?. map ( inbound => (
0 commit comments