diff --git a/ui/src/app/chats.tsx b/ui/src/app/chats.tsx index 0b3cf01..513f57e 100644 --- a/ui/src/app/chats.tsx +++ b/ui/src/app/chats.tsx @@ -1,4 +1,5 @@ import Avatar from "@/components/ui/avatar"; +import { Skeleton } from "@/components/ui/skeleton"; import { useChats } from "@/hooks/useChats"; import { useContacts } from "@/hooks/useContact"; import { getFormattedName } from "@/lib/utils"; @@ -23,7 +24,7 @@ export default function ChatsSection({ selected, onSelect }: Props) { const [query, setQuery] = useState(""); const contacts = useContacts(); - const { data: chats } = useChats({ + const { data: chats, isLoading } = useChats({ refetchInterval: 10_000, }); @@ -77,6 +78,21 @@ export default function ChatsSection({ selected, onSelect }: Props) { */}
+ {chats == null || isLoading + ? [...Array(20)].map((_, i) => ( +
+ +
+ + +
+
+ )) + : null} + {filteredChats?.map((chat) => (