small think causing refetching and fixing memoization and stuff
This commit is contained in:
@@ -50,7 +50,7 @@ export default function ProtectedRoute({
|
||||
refetch();
|
||||
}, [jwtToken]);
|
||||
|
||||
if (isLoading || isFetching) {
|
||||
if (isLoading) {
|
||||
return (
|
||||
<div className="container h-screen w-screen flex flex-col justify-center mx-10">
|
||||
<SkeletonLoader />
|
||||
|
||||
@@ -32,7 +32,7 @@ function Video({ peer }: { peer: Peer }) {
|
||||
.find((track) => track.enabled);
|
||||
|
||||
if (!videoAvailabe) console.log("someone muted!!! ooo");
|
||||
});
|
||||
}, 2000);
|
||||
});
|
||||
|
||||
peer.on("close", () => {
|
||||
|
||||
@@ -309,6 +309,12 @@ export default function NirvanaRouter() {
|
||||
[testLines, selectedLineId]
|
||||
);
|
||||
|
||||
const overlayView = useMemo(() => {
|
||||
if (desktopMode === "flowState") return <></>;
|
||||
|
||||
return <Overlay />;
|
||||
}, [desktopMode]);
|
||||
|
||||
return (
|
||||
<div className="flex flex-col h-screen">
|
||||
<NirvanaHeader onHeaderFocus={() => setDesktopMode("terminal")} />
|
||||
@@ -322,7 +328,7 @@ export default function NirvanaRouter() {
|
||||
<LineDetailsTerminal selectedLine={selectedLine} />
|
||||
)}
|
||||
|
||||
{desktopMode !== "flowState" && <Overlay />}
|
||||
{overlayView}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -59,12 +59,6 @@ export default function NirvanaTerminal({
|
||||
|
||||
<p className="text-slate-300 text-xs">3/5</p>
|
||||
</span>
|
||||
|
||||
<div onClick={() => setIsModalVisible(true)} className="ml-auto">
|
||||
<IconButton>
|
||||
<FaPlus />
|
||||
</IconButton>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* list of all lines */}
|
||||
@@ -81,7 +75,7 @@ export default function NirvanaTerminal({
|
||||
|
||||
{/* rest of the lines */}
|
||||
|
||||
<div className={"flex flex-col"}>
|
||||
<div className={"flex flex-col relative h-full"}>
|
||||
{restLines.map((line) => (
|
||||
<LineRow
|
||||
id={line.lineId}
|
||||
@@ -89,6 +83,15 @@ export default function NirvanaTerminal({
|
||||
onClick={handleSelectLine}
|
||||
/>
|
||||
))}
|
||||
|
||||
<div
|
||||
onClick={() => setIsModalVisible(true)}
|
||||
className="ml-auto absolute bottom-2 right-2 shadow-xl"
|
||||
>
|
||||
<IconButton>
|
||||
<FaPlus />
|
||||
</IconButton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user