import { useEffect } from 'react' import InfiniteScroll from 'react-infinite-scroll-component' import { Message } from './Message' import { Loader } from 'components/design/Loader' import { useMessages } from 'contexts/Messages' import { Emoji } from 'emoji-mart' import { emojiSet } from 'components/Emoji' export const Messages: React.FC = () => { const { messages, nextPage } = useMessages() useEffect(() => { window.scrollTo(0, document.body.scrollHeight) }, []) if (messages.rows.length === 0) { return (

Nothing to show here!{' '}

Start chatting to kill this Ghost!

) } return ( <>
} > {messages.rows.map((message) => { return })}
) }