diff --git a/web/components/chat/ChatContainer.tsx b/web/components/chat/ChatContainer.tsx index f8c37594b..b5d62c419 100644 --- a/web/components/chat/ChatContainer.tsx +++ b/web/components/chat/ChatContainer.tsx @@ -4,6 +4,7 @@ import { useState, useMemo, useCallback, useEffect, useRef } from 'react'; import { ChatMessage } from '../../interfaces/chat-message.model'; import { ChatState } from '../../interfaces/application-state'; import ChatUserMessage from './ChatUserMessage'; +import { LoadingOutlined } from '@ant-design/icons'; interface Props { messages: ChatMessage[]; @@ -15,10 +16,12 @@ export default function ChatContainer(props: Props) { const loading = state === ChatState.Loading; const chatContainerRef = useRef(null); + const spinIcon = return ( -
- +
+

Chat

+ (clientConfigStateAtom); const chatOpen = useRecoilValue(chatVisibilityAtom); + const messages = useRecoilValue(chatMessagesAtom); + const chatState = useRecoilValue(chatStateAtom); + const { extraPageContent } = clientConfig; return ( - - + +
@@ -33,14 +39,16 @@ export default function FooterComponent() { + {chatOpen && ( +
+ + +
+ )}
- - {chatOpen && ( - - - - )} +
+ {chatOpen && }
); } diff --git a/web/components/ui/Sidebar/Sidebar.module.scss b/web/components/ui/Sidebar/Sidebar.module.scss new file mode 100644 index 000000000..5d8b02220 --- /dev/null +++ b/web/components/ui/Sidebar/Sidebar.module.scss @@ -0,0 +1,12 @@ +.root { + background-color: var(--gray-700); + display: none; +} + +@media (min-width: 768px) { + .root { + display: flex; + } +} + + diff --git a/web/components/ui/Sidebar/Sidebar.tsx b/web/components/ui/Sidebar/Sidebar.tsx index f7d60ab69..a0aa4ad03 100644 --- a/web/components/ui/Sidebar/Sidebar.tsx +++ b/web/components/ui/Sidebar/Sidebar.tsx @@ -1,8 +1,8 @@ import Sider from 'antd/lib/layout/Sider'; import { useRecoilValue } from 'recoil'; -import { useEffect } from 'react'; import { ChatMessage } from '../../../interfaces/chat-message.model'; import ChatContainer from '../../chat/ChatContainer'; +import s from './Sidebar.module.scss'; import { chatMessagesAtom, chatVisibilityAtom, @@ -18,6 +18,7 @@ export default function Sidebar() { return (