props.onChatCardClick && props.onChatCardClick(chat.id)
}
avatarUsername={chat.last_message.sender?.username}
avatarUrl={
chat.last_message.sender
? chat.last_message.sender.avatar
: 'https://chat-engine-assets.s3.amazonaws.com/empty-chat-thumb.png'
}
renderChatCard={props.renderChatCard}
/>
);
});
};
if (props.renderChatList) {
return <>{props.renderChatList(props)}>;
}
return (
{props.isLoading ? renderLoading() : renderChats(props.chats)}
{props.hasMoreChats && (
}
/>
)}
);
};