2022-04-29 15:09:53 -07:00
|
|
|
import { Spin } from 'antd';
|
2022-04-27 23:19:20 -07:00
|
|
|
import { ChatMessage } from '../../interfaces/chat-message.model';
|
2022-04-29 15:09:53 -07:00
|
|
|
import { ChatState } from '../../interfaces/application-state';
|
2022-04-27 23:19:20 -07:00
|
|
|
|
|
|
|
interface Props {
|
|
|
|
messages: ChatMessage[];
|
2022-04-29 15:09:53 -07:00
|
|
|
state: ChatState;
|
2022-04-27 23:19:20 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
export default function ChatContainer(props: Props) {
|
2022-04-29 15:09:53 -07:00
|
|
|
const { messages, state } = props;
|
|
|
|
const loading = state === ChatState.Loading;
|
|
|
|
|
|
|
|
return (
|
|
|
|
<div>
|
|
|
|
<Spin tip="Loading..." spinning={loading}>
|
|
|
|
Chat container with scrolling chat messages go here
|
|
|
|
</Spin>
|
|
|
|
</div>
|
|
|
|
);
|
2022-04-27 23:19:20 -07:00
|
|
|
}
|