diff --git a/app/components/component-chat/src/Messages/Messages.jsx b/app/components/component-chat/src/Messages/Messages.jsx index 89a2fa0bbe7c97685619927bb5e269b808568420..4ede310a83735c2aa934eea4cc6b4686f3f2c3df 100644 --- a/app/components/component-chat/src/Messages/Messages.jsx +++ b/app/components/component-chat/src/Messages/Messages.jsx @@ -19,6 +19,7 @@ import { InnerMessageContainer, Byline, Placeholder, + Spinner, } from './style' const GET_MESSAGES = gql` @@ -133,7 +134,7 @@ const Messages = ({ channelId }) => { } }) - if (loading) return 'Loading...' + if (loading) return <Spinner /> if (error) return JSON.stringify(error) const firstMessage = data.messages.edges[0] diff --git a/app/components/component-chat/src/Messages/style.js b/app/components/component-chat/src/Messages/style.js index 022e90e840163193e464aa9ecc0d6b768b39977f..9cc7b11d8ccd8a6e709b388d11495b3e87bb5e2e 100644 --- a/app/components/component-chat/src/Messages/style.js +++ b/app/components/component-chat/src/Messages/style.js @@ -3,6 +3,7 @@ import { th } from '@pubsweet/ui-toolkit' import { HorizontalRule } from '../../../../globals' +export { Spinner } from '../../../shared' export const Timestamp = styled(HorizontalRule)` margin: 24px 0; text-align: center; diff --git a/app/components/component-chat/src/SuperChatInput/SuperChatInput.jsx b/app/components/component-chat/src/SuperChatInput/SuperChatInput.jsx index f84d21a878c6d863cef3989323a7206bba7d0968..275e2b2d1a81252a4e01ef95f56c8e8c2958f923 100644 --- a/app/components/component-chat/src/SuperChatInput/SuperChatInput.jsx +++ b/app/components/component-chat/src/SuperChatInput/SuperChatInput.jsx @@ -374,7 +374,7 @@ const SuperChatInput = props => { // onFocus={props.onFocus} onKeyDown={handleKeyPress} placeholder="Your message here..." - // staticSuggestions={props.participants} + staticSuggestions={props.participants} value={text} /> </InputWrapper>