1
- import type { SidebarLink } from "@/components/blocks/Sidebar" ;
2
- import { SidebarLayout } from "@/components/blocks/SidebarLayout" ;
3
1
import { Alert , AlertDescription , AlertTitle } from "@/components/ui/alert" ;
4
2
import { Badge } from "@/components/ui/badge" ;
5
3
import { Button } from "@/components/ui/button" ;
6
- import { DatabaseIcon } from "lucide-react" ;
4
+ import { DatabaseIcon , ExternalLinkIcon } from "lucide-react" ;
7
5
import Link from "next/link" ;
8
6
import { EngineIcon } from "../../../../../../../(dashboard)/(chain)/components/server/icons/EngineIcon" ;
7
+ import { TabPathLinks } from "../../../../../../../../../@/components/ui/tabs" ;
9
8
import { ImportEngineLink } from "./_components" ;
10
9
11
10
export default async function Layout ( props : {
@@ -17,57 +16,59 @@ export default async function Layout(props: {
17
16
} ) {
18
17
const params = await props . params ;
19
18
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
- ] ;
31
19
32
20
return (
33
- < div className = "container flex max-w-7xl grow flex-col" >
21
+ < div className = "flex grow flex-col" >
34
22
{ /* 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 >
50
46
</ 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" />
60
48
< EngineLegacyBannerUI
61
49
teamSlug = { params . team_slug }
62
50
projectSlug = { params . project_slug }
63
51
/>
64
52
</ div >
65
53
</ header >
66
54
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 >
71
72
</ div >
72
73
) ;
73
74
}
@@ -78,32 +79,37 @@ function EngineLegacyBannerUI(props: {
78
79
} ) {
79
80
return (
80
81
< Alert variant = "info" >
81
- < EngineIcon className = "size-5" />
82
82
< AlertTitle > Engine Cloud (Beta)</ AlertTitle >
83
- < AlertDescription >
84
- < div className = "h-2" />
83
+ < AlertDescription className = "pt-1" >
85
84
< p className = "text-primary-foreground text-sm" >
86
85
Try Engine Cloud (Beta) - now included for free in every thirdweb
87
86
project.
88
87
</ p >
89
88
< 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" >
91
90
< li > No recurring monthly cost, pay-per-request model</ li >
92
91
< li > Powered by Vault: our new TEE based key management system</ li >
93
92
< li > Improved performance and simplified transaction API</ li >
94
93
</ 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
+ >
104
100
< 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 >
107
113
</ div >
108
114
</ AlertDescription >
109
115
</ Alert >
0 commit comments