File size: 1,629 Bytes
87337b1 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
"use client"
import { useAppSelector, EMobileActiveTab } from "@/common"
import dynamic from "next/dynamic"
import Header from "@/components/Layout/Header"
import Action from "@/components/Layout/Action"
// import RTCCard from "@/components/Dynamic/RTCCard"
// import ChatCard from "@/components/Chat/ChatCard"
import AuthInitializer from "@/components/authInitializer"
import { cn } from "@/lib/utils"
const DynamicRTCCard = dynamic(() => import("@/components/Dynamic/RTCCard"), {
ssr: false,
})
const DynamicChatCard = dynamic(() => import("@/components/Chat/ChatCard"), {
ssr: false,
})
export default function Home() {
const mobileActiveTab = useAppSelector(
(state) => state.global.mobileActiveTab,
)
return (
<AuthInitializer>
<div className="relative mx-auto flex h-full min-h-screen flex-col md:h-screen">
<Header className="h-[60px]" />
<Action className="h-[48px]" />
<div className="mx-2 mb-2 flex h-full max-h-[calc(100vh-108px-24px)] flex-col md:flex-row md:gap-2">
<DynamicRTCCard
className={cn(
"m-0 w-full rounded-b-lg bg-[#181a1d] md:w-[480px] md:rounded-lg",
{
["hidden md:block"]: mobileActiveTab === EMobileActiveTab.CHAT,
},
)}
/>
<DynamicChatCard
className={cn(
"m-0 w-full rounded-b-lg bg-[#181a1d] md:rounded-lg",
{
["hidden md:block"]: mobileActiveTab === EMobileActiveTab.AGENT,
},
)}
/>
</div>
</div>
</AuthInitializer>
)
}
|