1- import type { SidebarLink } from "@/components/blocks/Sidebar" ;
2- import { SidebarLayout } from "@/components/blocks/SidebarLayout" ;
31import { Alert , AlertDescription , AlertTitle } from "@/components/ui/alert" ;
42import { Badge } from "@/components/ui/badge" ;
53import { Button } from "@/components/ui/button" ;
6- import { DatabaseIcon } from "lucide-react" ;
4+ import { DatabaseIcon , ExternalLinkIcon } from "lucide-react" ;
75import Link from "next/link" ;
86import { EngineIcon } from "../../../../../../../(dashboard)/(chain)/components/server/icons/EngineIcon" ;
7+ import { TabPathLinks } from "../../../../../../../../../@/components/ui/tabs" ;
98import { ImportEngineLink } from "./_components" ;
109
1110export default async function Layout ( props : {
@@ -17,57 +16,64 @@ export default async function Layout(props: {
1716} ) {
1817 const params = await props . params ;
1918 const linkPrefix = `/team/${ params . team_slug } /${ params . project_slug } /engine/dedicated` ;
20- const sidebarLinks : SidebarLink [ ] = [
21- {
22- label : "Engine Instances" ,
23- href : `${ linkPrefix } ` ,
24- exactMatch : true ,
25- } ,
26- {
27- label : "Import Engine" ,
28- href : `${ linkPrefix } /import` ,
29- } ,
30- ] ;
3119
3220 return (
33- < div className = "container flex max-w-7xl grow flex-col" >
21+ < div className = "flex grow flex-col" >
3422 { /* header */ }
35- < header className = "border-border border-b py-10" >
36- < div className = "container flex flex-col justify-between gap-4 lg:flex-row lg:items-center" >
37- < div className = "flex flex-col gap-2" >
38- < h1 className = "flex items-center gap-2 font-semibold text-3xl tracking-tight" >
39- Engine{ " " }
40- < Badge
41- variant = "warning"
42- className = "flex items-center gap-2 text-sm"
43- >
44- < DatabaseIcon className = "size-4" /> Dedicated
45- </ Badge >
46- </ h1 >
47- < p className = "flex flex-col text-muted-foreground text-sm" >
48- Manage your deployed Engine instances
49- </ p >
23+ < header className = "pt-10 pb-6" >
24+ < div className = "container max-w-7xl" >
25+ < div className = "flex flex-col justify-between gap-4 lg:flex-row lg:items-center" >
26+ < div className = "flex flex-col gap-2" >
27+ < h1 className = "flex items-center gap-2 font-semibold text-3xl tracking-tight" >
28+ Engine{ " " }
29+ < Badge
30+ variant = "warning"
31+ className = "flex items-center gap-2 text-sm"
32+ >
33+ < DatabaseIcon className = "size-4" /> Dedicated
34+ </ Badge >
35+ </ h1 >
36+ < p className = "flex flex-col text-muted-foreground text-sm" >
37+ Manage your deployed Engine instances
38+ </ p >
39+ </ div >
40+ < div className = "flex items-center gap-3" >
41+ < ImportEngineLink
42+ label = "Import Engine"
43+ engineLinkPrefix = { linkPrefix }
44+ />
45+ </ div >
5046 </ div >
51- < div className = "flex items-center gap-3" >
52- < ImportEngineLink
53- label = "Import Engine"
54- engineLinkPrefix = { linkPrefix }
55- />
56- </ div >
57- </ div >
58- < div className = "h-6" />
59- < div className = "container" >
47+ < div className = "h-6" />
6048 < EngineLegacyBannerUI
6149 teamSlug = { params . team_slug }
6250 projectSlug = { params . project_slug }
6351 />
6452 </ div >
6553 </ header >
6654
67- { /* sidebar layout */ }
68- < SidebarLayout sidebarLinks = { sidebarLinks } >
69- { props . children }
70- </ SidebarLayout >
55+ < div className = "relative" >
56+ < div className = "absolute right-0 bottom-0 left-0 h-[1px] bg-border" />
57+ < div className = "container max-w-7xl" >
58+ < TabPathLinks
59+ className = "pt-2"
60+ bottomLineClassName = "hidden"
61+ links = { [
62+ {
63+ name : "Engine Instances" ,
64+ path : `${ linkPrefix } ` ,
65+ exactMatch : true ,
66+ } ,
67+ {
68+ name : "Import Engine" ,
69+ path : `${ linkPrefix } /import` ,
70+ } ,
71+ ] }
72+ />
73+ </ div >
74+ </ div >
75+
76+ < div className = "container max-w-7xl pt-8 pb-10" > { props . children } </ div >
7177 </ div >
7278 ) ;
7379}
@@ -78,32 +84,37 @@ function EngineLegacyBannerUI(props: {
7884} ) {
7985 return (
8086 < Alert variant = "info" >
81- < EngineIcon className = "size-5" />
8287 < AlertTitle > Engine Cloud (Beta)</ AlertTitle >
83- < AlertDescription >
84- < div className = "h-2" />
85- < p className = "text-primary-foreground text-sm" >
88+ < AlertDescription className = "pt-1" >
89+ < p className = "text-foreground text-sm" >
8690 Try Engine Cloud (Beta) - now included for free in every thirdweb
8791 project.
8892 </ p >
8993 < div className = "h-2" />
90- < ul className = "list-disc pl-4 text-muted-foreground text-sm" >
94+ < ul className = "list-disc space-y-1.5 pl-4 text-muted-foreground text-sm" >
9195 < li > No recurring monthly cost, pay-per-request model</ li >
9296 < li > Powered by Vault: our new TEE based key management system</ li >
9397 < li > Improved performance and simplified transaction API</ li >
9498 </ ul >
95- < div className = "h-4" />
96- < div className = "flex justify-end gap-2" >
97- < Link href = { "https://portal.thirdweb.com/engine/v3" } target = "_blank" >
98- < Button variant = "outline" > Learn More</ Button >
99- </ Link >
100- < Link
101- href = { `/team/${ props . teamSlug } /${ props . projectSlug } /engine/cloud` }
102- >
103- < Button variant = { "primary" } className = "flex items-center gap-2" >
99+ < div className = "h-6" />
100+ < div className = "flex justify-start gap-3" >
101+ < Button className = "flex items-center gap-2" asChild size = "sm" >
102+ < Link
103+ href = { `/team/${ props . teamSlug } /${ props . projectSlug } /engine/cloud` }
104+ >
104105 < EngineIcon className = "size-4" /> Try Engine Cloud
105- </ Button >
106- </ Link >
106+ </ Link >
107+ </ Button >
108+
109+ < Button variant = "outline" asChild size = "sm" >
110+ < Link
111+ href = { "https://portal.thirdweb.com/engine/v3" }
112+ target = "_blank"
113+ className = "gap-2 bg-background"
114+ >
115+ Learn More < ExternalLinkIcon className = "size-4" />
116+ </ Link >
117+ </ Button >
107118 </ div >
108119 </ AlertDescription >
109120 </ Alert >
0 commit comments