This commit is contained in:
Ryan Chen
2025-10-29 22:17:45 -04:00
parent 5ebdd60ea0
commit 7f1d4fbdda

View File

@@ -22,8 +22,14 @@ export const ConversationList = ({
useEffect(() => {
const loadConversations = async () => {
try {
const fetchedConversations =
let fetchedConversations =
await conversationService.getAllConversations();
if (conversations.length == 0) {
await conversationService.createConversation();
fetchedConversations =
await conversationService.getAllConversations();
}
setConversations(
fetchedConversations.map((conversation) => ({
id: conversation.id,