Skip to content

armgit / E2B

Public Imported from GitHub
0

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

Fix /dashboard and /auth general layout

Vasek Mlejnskydfe6515215b8
diff --git a/apps/web/src/components/BentoGrid.tsx b/apps/web/src/components/BentoGrid.tsx
deleted file mode 100644
index 8e1336910..000000000
--- a/apps/web/src/components/BentoGrid.tsx
+++ /dev/null
@@ -1,78 +0,0 @@
-import { Button } from './Button'
-import { cn } from '@/lib/utils'
-// import { ArrowRightIcon } from '@radix-ui/react-icons'
-import { ReactNode } from 'react'
-
-const BentoGrid = ({
- children,
- className,
-}: {
- children: ReactNode;
- className?: string;
-}) => {
- return (
- <div
- className={cn(
- '',
- className,
- )}
- >
- {children}
- </div>
- )
-}
-
-const BentoCard = ({
- name,
- className,
- background,
- Icon,
- description,
- href,
- cta,
-}: {
- name: string;
- className: string;
- background: React.ReactNode;
- Icon: any;
- description: string;
- href: string;
- cta: string;
-}) => (
- <div
- key={name}
- className={cn(
- 'group relative col-span-3 flex flex-col justify-between overflow-hidden rounded-xl',
- // light styles
- 'bg-white [box-shadow:0_0_0_1px_rgba(0,0,0,.03),0_2px_4px_rgba(0,0,0,.05),0_12px_24px_rgba(0,0,0,.05)]',
- // dark styles
- 'transform-gpu dark:bg-black dark:[border:1px_solid_rgba(255,255,255,.1)] dark:[box-shadow:0_-20px_80px_-20px_#ffffff1f_inset]',
- className,
- )}
- >
- <div>{background}</div>
- <div className="pointer-events-none z-10 flex transform-gpu flex-col gap-1 p-6 transition-all duration-300 group-hover:-translate-y-10">
- <Icon className="h-12 w-12 origin-left transform-gpu text-neutral-700 transition-all duration-300 ease-in-out group-hover:scale-75" />
- <h3 className="text-xl font-semibold text-neutral-700 dark:text-neutral-300">
- {name}
- </h3>
- <p className="max-w-lg text-neutral-400">{description}</p>
- </div>
-
- <div
- className={cn(
- 'pointer-events-none absolute bottom-0 flex w-full translate-y-10 transform-gpu flex-row items-center p-4 opacity-0 transition-all duration-300 group-hover:translate-y-0 group-hover:opacity-100',
- )}
- >
- <Button variant="outline" className="pointer-events-auto">
- <a href={href}>
- {cta}
- {/* <ArrowRightIcon className="ml-2 h-4 w-4" /> */}
- </a>
- </Button>
- </div>
- <div className="pointer-events-none absolute inset-0 transform-gpu transition-all duration-300 group-hover:bg-black/[.03] group-hover:dark:bg-neutral-800/10" />
- </div>
-)
-
-export { BentoCard, BentoGrid }
diff --git a/apps/web/src/components/Layout.tsx b/apps/web/src/components/Layout.tsx
index c0f692b17..c0164d9c8 100644
--- a/apps/web/src/components/Layout.tsx
+++ b/apps/web/src/components/Layout.tsx
@@ -18,31 +18,34 @@ export function Layout({
const pathname = usePathname()
const relativePathname = pathname?.replace(new RegExp('^/docs'), '')
const isDocs = pathname?.startsWith('/docs')
+ const isDashboard = pathname?.startsWith('/dashboard')
return (
<SectionProvider sections={relativePathname ? allSections[relativePathname] ?? [] : []}>
- <div className={clsx('h-full', { 'lg:ml-[var(--sidebar-nav-width)]': isDocs })}>
- <motion.header
- layoutScroll
- className='contents lg:pointer-events-none lg:fixed lg:inset-0 lg:z-40 lg:flex lg:top-[60px]'
- >
- <div
- id="sidebar"
- className="
- scrollbar-thin
- scrollbar-thumb-scrollbar
- contents
- lg:pointer-events-auto
- lg:block
- lg:w-[var(--sidebar-nav-width)]
- lg:overflow-y-auto
- lg:px-6
- lg:pb-8
- "
+ <div className={clsx('h-full w-full', { 'lg:ml-[var(--sidebar-nav-width)]': isDocs })}>
+ {!isDashboard && (
+ <motion.header
+ layoutScroll
+ className='contents lg:pointer-events-none lg:fixed lg:inset-0 lg:z-40 lg:flex lg:top-[60px]'
>
- {isDocs && <Navigation className="hidden lg:my-4 lg:block" />}
- </div>
- </motion.header>
+ <div
+ id="sidebar"
+ className="
+ lg:pointer-events-auto
+ scrollbar-thin
+ scrollbar-thumb-scrollbar
+ contents
+ lg:block
+ lg:w-[var(--sidebar-nav-width)]
+ lg:overflow-y-auto
+ lg:px-6
+ lg:pb-8
+ "
+ >
+ {isDocs && <Navigation className="hidden lg:my-4 lg:block" />}
+ </div>
+ </motion.header>
+ )}
{isDocs && (
<div
className="
@@ -78,8 +81,7 @@ export function Layout({
"
>
<main className="
- flex
- flex-1
+ flex-auto
">
{children}
</main>
diff --git a/apps/web/src/components/RetroGrid.tsx b/apps/web/src/components/RetroGrid.tsx
deleted file mode 100644
index 504cd2703..000000000
--- a/apps/web/src/components/RetroGrid.tsx
+++ /dev/null
@@ -1,32 +0,0 @@
-import { cn } from '@/lib/utils'
-
-export default function RetroGrid({ className }: { className?: string }) {
-return (
- <div
- className={cn(
- 'pointer-events-none absolute h-full w-full overflow-hidden opacity-50 [perspective:200px]',
- className,
- )}
- >
- {/* Grid */}
- <div className="absolute inset-0 [transform:rotateX(35deg)]">
- <div
- className={cn(
- 'animate-grid',
-
- '[background-repeat:repeat] [background-size:60px_60px] [height:300vh] [inset:0%_0px] [margin-left:-50%] [transform-origin:100%_0_0] [width:600vw]',
-
- // Light Styles
- '[background-image:linear-gradient(to_right,rgba(0,0,0,0.3)_1px,transparent_0),linear-gradient(to_bottom,rgba(0,0,0,0.3)_1px,transparent_0)]',
-
- // Dark styles
- 'dark:[background-image:linear-gradient(to_right,rgba(255,255,255,0.2)_1px,transparent_0),linear-gradient(to_bottom,rgba(255,255,255,0.2)_1px,transparent_0)]',
- )}
- />
- </div>
-
- {/* Background Gradient */}
- <div className="absolute inset-0 bg-gradient-to-t from-white to-transparent to-90% dark:from-black" />
- </div>
-)
-}
diff --git a/apps/web/vercel.json b/apps/web/vercel.json
index 4040c25f5..0f0d7ddf2 100644
--- a/apps/web/vercel.json
+++ b/apps/web/vercel.json
@@ -87,4 +87,4 @@
"permanent": true
}
]
-}
+}
\ No newline at end of file