import { Spin } from 'antd';
import { Virtuoso } from 'react-virtuoso';
import { useRef } from 'react';
import { LoadingOutlined } from '@ant-design/icons';
import { MessageType, NameChangeEvent } from '../../../interfaces/socket-events';
import s from './ChatContainer.module.scss';
import { ChatMessage } from '../../../interfaces/chat-message.model';
import { ChatUserMessage } from '..';
import ChatActionMessage from '../ChatActionMessage';
interface Props {
messages: ChatMessage[];
loading: boolean;
}
export default function ChatContainer(props: Props) {
const { messages, loading } = props;
const chatContainerRef = useRef(null);
const spinIcon =