Closed rizshivalli closed 9 months ago
@rizshivalli How did you installed v2.0.0 if there is no package with that version? Please upgrade to v2.0.3, and let me know if that helps.
You can also try to add 'use client'
to the file where components are used.
I am using 2.0.3
version itself
Its working with 'use-client'
but the styles are not getting applied.
"use client";
import styles from "@chatscope/chat-ui-kit-styles/dist/default/styles.min.css";
import {
ChatContainer,
MainContainer,
Message,
MessageInput,
MessageList,
} from "@chatscope/chat-ui-kit-react";
export default function Home() {
return (
<div style={{ position: "relative", height: "500px" }}>
<MainContainer>
<ChatContainer>
<MessageList>
<Message
model={{
message: "Hello my friend",
sentTime: "just now",
sender: "Joe",
}}
/>
</MessageList>
<MessageInput placeholder="Type message here" />
</ChatContainer>
</MainContainer>
</div>
);
}
Can you try the following ?
import '@chatscope/chat-ui-kit-styles/dist/default/styles.min.css';
Now working, Thank you
Getting this error on the fresh install of next.js and chat-ui-kit-react
installed dependencies