import MessageListItem from '@components/chats/messageListItem'; import useLocalStorage from '@rehooks/local-storage'; import { useCallback, useRef } from 'react'; import { Virtuoso } from 'react-virtuoso'; export const MessageList = ({ data }: { data: any }) => { const [activeAccount]: any = useLocalStorage('activeAccount', {}); const virtuosoRef = useRef(null); const itemContent: any = useCallback( (index: string | number) => { return ( ); }, [activeAccount.privkey, activeAccount.pubkey, data] ); const computeItemKey = useCallback( (index: string | number) => { return data[index].id; }, [data] ); return (
); };