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,59 @@ 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+ < TabPathLinks
56+ className = "pt-2"
57+ tabContainerClassName = "container max-w-7xl"
58+ links = { [
59+ {
60+ name : "Engine Instances" ,
61+ path : `${ linkPrefix } ` ,
62+ exactMatch : true ,
63+ } ,
64+ {
65+ name : "Import Engine" ,
66+ path : `${ linkPrefix } /import` ,
67+ } ,
68+ ] }
69+ />
70+
71+ < div className = "container max-w-7xl pt-8 pb-10" > { props . children } </ div >
7172 </ div >
7273 ) ;
7374}
@@ -78,32 +79,37 @@ function EngineLegacyBannerUI(props: {
7879} ) {
7980 return (
8081 < Alert variant = "info" >
81- < EngineIcon className = "size-5" />
8282 < AlertTitle > Engine Cloud (Beta)</ AlertTitle >
83- < AlertDescription >
84- < div className = "h-2" />
85- < p className = "text-primary-foreground text-sm" >
83+ < AlertDescription className = "pt-1" >
84+ < p className = "text-foreground text-sm" >
8685 Try Engine Cloud (Beta) - now included for free in every thirdweb
8786 project.
8887 </ p >
8988 < div className = "h-2" />
90- < ul className = "list-disc pl-4 text-muted-foreground text-sm" >
89+ < ul className = "list-disc space-y-1.5 pl-4 text-muted-foreground text-sm" >
9190 < li > No recurring monthly cost, pay-per-request model</ li >
9291 < li > Powered by Vault: our new TEE based key management system</ li >
9392 < li > Improved performance and simplified transaction API</ li >
9493 </ 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" >
94+ < div className = "h-6" />
95+ < div className = "flex justify-start gap-3" >
96+ < Button className = "flex items-center gap-2" asChild size = "sm" >
97+ < Link
98+ href = { `/team/${ props . teamSlug } /${ props . projectSlug } /engine/cloud` }
99+ >
104100 < EngineIcon className = "size-4" /> Try Engine Cloud
105- </ Button >
106- </ Link >
101+ </ Link >
102+ </ Button >
103+
104+ < Button variant = "outline" asChild size = "sm" >
105+ < Link
106+ href = { "https://portal.thirdweb.com/engine/v3" }
107+ target = "_blank"
108+ className = "gap-2 bg-background"
109+ >
110+ Learn More < ExternalLinkIcon className = "size-4" />
111+ </ Link >
112+ </ Button >
107113 </ div >
108114 </ AlertDescription >
109115 </ Alert >
0 commit comments