Skip to content

Commit

Permalink
fix: stream-chat css
Browse files Browse the repository at this point in the history
  • Loading branch information
warmachine028 committed Nov 19, 2024
1 parent 9c98701 commit bb31805
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 8 deletions.
2 changes: 2 additions & 0 deletions client/src/components/NotificationsButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,6 @@ const NotificationsButton = ({ initialState }: NotificationsButtonProps) => {
)
}

NotificationsButton.displayName = 'NotificationsButton'

export default NotificationsButton
19 changes: 19 additions & 0 deletions client/src/components/chats/Channel.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
'use client'

// import { ChannelHeader, MessageInput, MessageList, Channel as StreamChannel, Window } from 'stream-chat-react'

const Channel = () => {
return (
<div className="w-full">
{/* <StreamChannel>
<Window>
<ChannelHeader />
<MessageList />
<MessageInput />
</Window>
</StreamChannel> */}
</div>
)
}

export default Channel
7 changes: 4 additions & 3 deletions client/src/components/chats/Chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

import { useInitializeChatClient } from '@/hooks'
import { Loader2 } from 'lucide-react'
import { Sidebar, Channel } from '.'
// import { Chat as StreamChat } from 'stream-chat-react'
// import { Sidebar, Channel } from '.'

const Chat = () => {
const chatClient = useInitializeChatClient()

Expand All @@ -13,10 +14,10 @@ const Chat = () => {

return (
<div className="absolute bottom-0 top-0 flex w-full">
{/* <StreamChat client={chatClient}>
{/* <StreamChat client={chatClient}> */}
<Sidebar />
<Channel />
</StreamChat> */}
{/* </StreamChat> */}
</div>
)
}
Expand Down
6 changes: 3 additions & 3 deletions client/src/components/chats/Sidebar.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
'use client'

import { useSession } from '@/hooks'
import { ChannelList } from 'stream-chat-react'
// import { ChannelList } from 'stream-chat-react'

const ChatSidebar = () => {
const { user } = useSession()

return (
<div className="flex size-full flex-col border-e md:w-72 ring">
<ChannelList filters={{ type: 'messaging', members: { $in: [user?.id] } }} showChannelSearch />
<div className="flex size-full flex-col border-e md:w-72 ring-1">
{/* <ChannelList filters={{ type: 'messaging', members: { $in: [user?.id] } }} showChannelSearch /> */}
</div>
)
}
Expand Down
2 changes: 2 additions & 0 deletions client/src/components/chats/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
export { default as Chat } from './Chat'
export { default as Sidebar } from './Sidebar'
export { default as Channel } from './Channel'
2 changes: 1 addition & 1 deletion client/src/components/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
export * from './posts'
export * from './chats'
export * from './users'
export { default as Avatar } from './Avatar'
export { default as Navbar } from './Navbar'
export { default as Footer } from './Footer'
export { default as Linkify } from './Linkify'
export { default as Menubar } from './Menubar'
export { Button as UserButton } from './users'
export { default as SearchBar } from './SearchBar'
export { default as ThemeSwitch } from './ThemeSwitch'
export { default as AlertButton } from './AlertButton'
Expand Down
3 changes: 2 additions & 1 deletion client/src/components/users/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export { default as Button } from './Button'
export { default as UserButton } from './Button'
export { default as UserTooltip } from './Tooltip'
export { default as LinkWithTooltip } from './LinkWithTooltip'

1 comment on commit bb31805

@vercel
Copy link

@vercel vercel bot commented on bb31805 Nov 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.