client/apps/web/src/components/callSidebarBox.tsx

15 lines
368 B
TypeScript

import { lazy, Suspense } from "react";
import { useCall } from "@tensamin/call/state";
const SidebarBox = lazy(() => import("@tensamin/call/sidebarBox"));
export default function CallSidebarBox() {
const active = useCall((state) => state.state !== "closed");
return active ? (
<Suspense fallback={null}>
<SidebarBox />
</Suspense>
) : null;
}