|
@ -18,6 +18,7 @@ import { MessageAvatarPlaceholderIcon } from '@/components/icons/message-avatar- |
|
|
import { PusherConfig } from '@/utils/pusher-config'; |
|
|
import { PusherConfig } from '@/utils/pusher-config'; |
|
|
import { toast } from 'react-toastify'; |
|
|
import { toast } from 'react-toastify'; |
|
|
import { Config } from '@/config'; |
|
|
import { Config } from '@/config'; |
|
|
|
|
|
import { Button } from 'react-scroll'; |
|
|
|
|
|
|
|
|
type IProps = { |
|
|
type IProps = { |
|
|
user: any; |
|
|
user: any; |
|
@ -75,8 +76,8 @@ const MessageBar = ({ user }: IProps) => { |
|
|
// here messages will be passed as a props in eventData. to keep the useEffect track of having a new message
|
|
|
// here messages will be passed as a props in eventData. to keep the useEffect track of having a new message
|
|
|
return ( |
|
|
return ( |
|
|
<> |
|
|
<> |
|
|
<Menu as="a" href='/dashboard/chat' className="inline-block text-left sm:relative"> |
|
|
|
|
|
<Menu.Button |
|
|
|
|
|
|
|
|
<Link |
|
|
|
|
|
href='/dashboard/chat' |
|
|
className={cn( |
|
|
className={cn( |
|
|
'relative flex h-9 w-9 items-center justify-center gap-2 rounded-full border border-gray-200 bg-gray-50 text-gray-600 before:absolute before:top-0 before:right-0 before:h-2 before:w-2 before:rounded-full focus:outline-none data-[headlessui-state=open]:bg-white data-[headlessui-state=open]:text-accent', |
|
|
'relative flex h-9 w-9 items-center justify-center gap-2 rounded-full border border-gray-200 bg-gray-50 text-gray-600 before:absolute before:top-0 before:right-0 before:h-2 before:w-2 before:rounded-full focus:outline-none data-[headlessui-state=open]:bg-white data-[headlessui-state=open]:text-accent', |
|
|
activeStatus?.unseen ? 'before:bg-accent' : null |
|
|
activeStatus?.unseen ? 'before:bg-accent' : null |
|
@ -84,9 +85,8 @@ const MessageBar = ({ user }: IProps) => { |
|
|
> |
|
|
> |
|
|
<MessageIcon |
|
|
<MessageIcon |
|
|
className={cn('h-5 w-5')} |
|
|
className={cn('h-5 w-5')} |
|
|
onClick={() => setConversationsOpen(!conversationsOpen)} |
|
|
|
|
|
/> |
|
|
/> |
|
|
</Menu.Button> |
|
|
|
|
|
|
|
|
</Link> |
|
|
|
|
|
|
|
|
{/* <MessageBox |
|
|
{/* <MessageBox |
|
|
eventName={`${process.env.NEXT_PUBLIC_MESSAGE_EVENT}`} |
|
|
eventName={`${process.env.NEXT_PUBLIC_MESSAGE_EVENT}`} |
|
@ -97,7 +97,6 @@ const MessageBar = ({ user }: IProps) => { |
|
|
/> */} |
|
|
/> */} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</Menu> |
|
|
|
|
|
</> |
|
|
</> |
|
|
); |
|
|
); |
|
|
}; |
|
|
}; |
|
|