Skip to content

Commit

Permalink
Updated Stream and deprecated components
Browse files Browse the repository at this point in the history
* We may want to revisit the `MessageInput` component and create our own custom one: https://getstream.io/chat/docs/sdk/react/guides/theming/input_ui/
  • Loading branch information
dzwood committed Oct 18, 2023
1 parent 3afc2d9 commit 5969124
Show file tree
Hide file tree
Showing 3 changed files with 938 additions and 672 deletions.
18 changes: 8 additions & 10 deletions components/Chat/Chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
Channel,
ChannelHeader,
Chat as StreamChat,
MessageInputSmall,
MessageInput,
MessageList,
Thread,
Window,
Expand Down Expand Up @@ -36,14 +36,12 @@ export default function Chat(props = {}) {
const { channelType, channelId } = props.streamChatChannel;
const isLivestream = channelType === 'livestream';

const {
getCurrentUserRoleForChatChannel,
streamChatRole,
} = useCurrentUserRoleForChatChannel({
variables: {
channelId,
},
});
const { getCurrentUserRoleForChatChannel, streamChatRole } =
useCurrentUserRoleForChatChannel({
variables: {
channelId,
},
});

// Semantic shortcuts
const connected = connectionStatus === CONNECTED;
Expand Down Expand Up @@ -139,7 +137,7 @@ export default function Chat(props = {}) {
</Box>
)}
<MessageList />
{authenticated && <MessageInputSmall noFiles={noFileUploads} />}
{authenticated && <MessageInput noFiles={noFileUploads} />}
{!authenticated && (
<Styled.CenteredContent p="base">
<Button variant="secondary" onClick={handleLoginClick}>
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,16 @@
"prop-types": "^15.7.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-file-utils": "^1.2.0",
"react-is": "^18.2.0",
"react-multi-carousel": "2.8.4",
"react-player": "^2.9.0",
"react-quill": "^2.0.0",
"react-simple-typewriter": "^5.0.1",
"sanitize-html": "^2.7.0",
"storybook": "^7.0.18",
"stream-chat": "3.1.x",
"stream-chat-react": "^4.1.3",
"stream-chat": "^8.13.0",
"stream-chat-react": "^10.14.0",
"styled-components": "^6.0.0-rc.3",
"styled-system": "^5.1.5",
"url": "^0.11.0",
Expand Down
Loading

0 comments on commit 5969124

Please sign in to comment.