Skip to content

armgit / E2B

Public Imported from GitHub
0

Open-source, secure environment with real-world tools for enterprise-grade agents.

Cleanup page

Vasek Mlejnsky5b566a54a132
diff --git a/apps/web/src/app/(dashboard)/dashboard/layout.tsx b/apps/web/src/app/(dashboard)/dashboard/layout.tsx
index bb8f8a0df..3fa45af74 100644
--- a/apps/web/src/app/(dashboard)/dashboard/layout.tsx
+++ b/apps/web/src/app/(dashboard)/dashboard/layout.tsx
@@ -1,12 +1,14 @@
-import { LayoutDashboard } from '@/components/LayoutDashboard'
+import { FooterMain } from '@/components/Footer'
import { Toaster } from '@/components/ui/toaster'
-
export default async function Layout({ children }) {
return (
- <LayoutDashboard>
- {children}
- <Toaster />
- </LayoutDashboard>
+ <div className="h-full w-full">
+ <main className="w-full h-full flex flex-col">
+ {children}
+ <Toaster />
+ </main>
+ <FooterMain />
+ </div>
)
}
diff --git a/apps/web/src/app/layout.tsx b/apps/web/src/app/layout.tsx
index 712e03eea..0f2f1083c 100644
--- a/apps/web/src/app/layout.tsx
+++ b/apps/web/src/app/layout.tsx
@@ -37,8 +37,18 @@ declare global {
}
}
+export default async function RootLayout({ children, params }) {
+ const isSandboxRoute = params?.sandboxId !== undefined
+
+ if (isSandboxRoute) {
+ return (
+ <html lang="en">
+ <head></head>
+ <body>{children}</body>
+ </html>
+ )
+ }
-export default async function RootLayout({ children }) {
const pages = await glob('**/*.mdx', { cwd: 'src/app/(docs)/docs' })
const allSectionsEntries = (await Promise.all(
pages.map(async filename => [
@@ -48,7 +58,6 @@ export default async function RootLayout({ children }) {
)) as Array<[string, Array<Section>]>
const allSections = Object.fromEntries(allSectionsEntries)
-
return (
<html
lang="en"
diff --git a/apps/web/src/app/stream/sandbox/[sandboxId]/layout.tsx b/apps/web/src/app/stream/sandbox/[sandboxId]/layout.tsx
new file mode 100644
index 000000000..ba57e405e
--- /dev/null
+++ b/apps/web/src/app/stream/sandbox/[sandboxId]/layout.tsx
@@ -0,0 +1,9 @@
+import { Fragment } from 'react'
+
+export default async function Layout({ children }) {
+ return (
+ <Fragment>
+ {children}
+ </Fragment>
+ )
+}
diff --git a/apps/web/src/app/stream/sandbox/[sandboxId]/page.tsx b/apps/web/src/app/stream/sandbox/[sandboxId]/page.tsx
index 1cb0e80a0..7df9c0944 100644
--- a/apps/web/src/app/stream/sandbox/[sandboxId]/page.tsx
+++ b/apps/web/src/app/stream/sandbox/[sandboxId]/page.tsx
@@ -34,18 +34,16 @@ export default async function StreamPage({ params }: { params: { sandboxId: stri
}
return (
- <Suspense fallback={<div>Loading...</div>}>
- <h1>Stream Details</h1>
- <div>Sandbox ID: {stream.sandboxId}</div>
- <div>Playback ID: {stream.playbackId}</div>
-
- <MuxPlayer
- playbackId={stream.playbackId}
- metadata={{
- video_id: `sandbox-${stream.sandboxId}`,
- video_title: 'Desktop Sandbox Stream',
- }}
- />
+ <Suspense fallback={<div className="h-full w-full flex items-center justify-center">Loading stream...</div>}>
+ <div className="h-full w-full">
+ <MuxPlayer
+ playbackId={stream.playbackId}
+ metadata={{
+ video_id: `sandbox-${stream.sandboxId}`,
+ video_title: 'Desktop Sandbox Stream',
+ }}
+ />
+ </div>
</Suspense>
)
}
diff --git a/apps/web/src/components/LayoutDashboard.tsx b/apps/web/src/components/LayoutDashboard.tsx
deleted file mode 100644
index 5262c828f..000000000
--- a/apps/web/src/components/LayoutDashboard.tsx
+++ /dev/null
@@ -1,18 +0,0 @@
-import { FooterMain } from '@/components/Footer'
-
-export function LayoutDashboard({
- children,
-}: {
- children: React.ReactNode
-}) {
- return (
- <div className="h-full w-full">
- <main className="w-full h-full flex flex-col">
- {children}
- </main>
- <FooterMain />
- </div>
- )
-}
-
-