}
+ size="xs"
+ value={search}
+ onChange={(e) => setSearch(e.currentTarget.value)}
+ />
+
+
+ {isLoading &&
}
+ {!isLoading && chats.length === 0 && (
+
+
+
+ {isSearching ? t("No chats found") : t("No conversations yet")}
+
+
+ {isSearching
+ ? t("Try a different search term.")
+ : t("Start a new chat to see it here.")}
+
+
+ )}
+ {isSearching
+ ? chats.map((chat) => (
+
+ ))
+ : groupedChats.map((group) => (
+
+
{group.label}
+ {group.chats.map((chat) => (
+
+ ))}
+
+ ))}
+ {!isSearching && (
+ <>
+
+ {isFetchingNextPage && (
+
+
+
+ )}
+ >
+ )}
+