Tip: You can fork the sandbox, insert your CometChat credentials (App ID, Region, Auth Key.) in the code, and immediately preview how the UI and messages respond in real time.

CometChatTabs component. This component will render different tabs and allow switching between sections dynamically.
CometChatTabs folder inside your src directory and add the following files:
Sidebar component which will render different conversations.
CometChatSelector folder inside your src/app directory and add the following files:
CometChatNoSSR.tsx & CometChatNoSSR.css files to import these new components as below,
CometChatNoSSR.tsx in Next.jsCometChatNoSSR.tsx while keeping the rest of the application’s SSR functionality intact. This ensures that the CometChat UI Kit components load only on the client-side, preventing SSR-related issues.
index.tsxindex.tsx file to dynamically import the CometChatNoSSR.tsx component with { ssr: false }.
{ ssr: false }, we ensure that CometChatNoSSR.tsx only loads on the client.