This commit is contained in:
2024-10-28 16:17:08 +05:00
parent 6c7289744c
commit b7e6e945fc
3 changed files with 151 additions and 122 deletions
+5 -2
View File
@@ -12,10 +12,11 @@ import useChatStore from "../stores/useChatStore";
import { isMobile } from "react-device-detect";
interface Props {
isFullscreen: boolean;
onClose: () => void;
}
function Chat2({ onClose }: Props) {
function Chat2({ isFullscreen, onClose }: Props) {
const { socket } = useSocketStore();
const { me, users } = useStreamUserStore();
// const [messages] = useStateRef<IMessage[]>([]);
@@ -45,7 +46,9 @@ function Chat2({ onClose }: Props) {
return (
<div
className={`chat lg:relative absolute right-0 lg:h-[calc(100dvh-48px)] h-dvh flex flex-col w-[296px] bg-white border-t border-[#DAE0E5]`}
className={`chat lg:relative absolute right-0 ${
!isFullscreen ? "lg:h-[calc(100dvh-48px)]" : ""
} h-dvh flex flex-col w-[296px] bg-white border-t border-[#DAE0E5]`}
>
<div className="p-4 pb-2">
<div className="flex items-center justify-between border-b border-[#DAE0E5] pb-4">