From ca7d9185350ae9468723474506559bd173ed5c0a Mon Sep 17 00:00:00 2001 From: Akhileshrangani4 Date: Fri, 13 Sep 2024 20:46:43 -0400 Subject: [PATCH] fix: ghost terminals and spam HTTPs requests on dashboard --- frontend/app/(app)/code/[id]/page.tsx | 5 +++++ frontend/app/layout.tsx | 2 -- frontend/components/dashboard/index.tsx | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/frontend/app/(app)/code/[id]/page.tsx b/frontend/app/(app)/code/[id]/page.tsx index d97025b..23dfd1d 100644 --- a/frontend/app/(app)/code/[id]/page.tsx +++ b/frontend/app/(app)/code/[id]/page.tsx @@ -6,6 +6,7 @@ import { notFound, redirect } from "next/navigation" import Loading from "@/components/editor/loading" import dynamic from "next/dynamic" import fs from "fs" +import { TerminalProvider } from "@/context/TerminalContext" export const revalidate = 0 @@ -87,8 +88,10 @@ export default async function CodePage({ params }: { params: { id: string } }) { } return ( + <>
+
+
+ ) } diff --git a/frontend/app/layout.tsx b/frontend/app/layout.tsx index 2ba77ac..914d0ca 100644 --- a/frontend/app/layout.tsx +++ b/frontend/app/layout.tsx @@ -32,9 +32,7 @@ export default function RootLayout({ > - {children} - diff --git a/frontend/components/dashboard/index.tsx b/frontend/components/dashboard/index.tsx index 42231dd..a7094ec 100644 --- a/frontend/components/dashboard/index.tsx +++ b/frontend/components/dashboard/index.tsx @@ -51,7 +51,7 @@ export default function Dashboard({ useEffect(() => { // update the dashboard to show a new project router.refresh() - }, [sandboxes]) + }, []) return ( <>