Resolve various warnings during export

This commit is contained in:
sabaimran
2024-08-03 17:33:04 +05:30
parent 5a75f2c00f
commit 87e97e40f4
12 changed files with 56 additions and 48 deletions

View File

@@ -92,7 +92,7 @@ export default function ChatHistory(props: ChatHistoryProps) {
scrollToBottomAfterDataLoad();
}
}, [chatHistoryRef.current, data]);
}, [data, currentPage]);
useEffect(() => {
if (!hasMoreMessages || fetchingData) return;
@@ -111,7 +111,7 @@ export default function ChatHistory(props: ChatHistoryProps) {
}
return () => observer.disconnect();
}, [sentinelRef.current, hasMoreMessages, currentPage, fetchingData]);
}, [hasMoreMessages, currentPage, fetchingData]);
useEffect(() => {
setHasMoreMessages(true);
@@ -160,7 +160,7 @@ export default function ChatHistory(props: ChatHistoryProps) {
return () => observer.disconnect();
}, []);
const fetchMoreMessages = (currentPage: number) => {
function fetchMoreMessages(currentPage: number) {
if (!hasMoreMessages || fetchingData) return;
const nextPage = currentPage + 1;