@@ -66,109 +66,104 @@ export default async function DeployInfrastructureOnChainPage(props: {
6666 : "N/A" ;
6767
6868 return (
69- < div className = "flex flex-col gap-8" >
70- { /* Chain header */ }
71- < div className = "flex flex-col items-center gap-4 md:flex-row" >
72- < h2 className = "text-2xl font-bold flex items-center gap-2" >
73- Infrastructure for
74- </ h2 >
75- < Card >
76- < CardContent className = "flex gap-4 items-center p-4" >
77- < span className = "flex gap-2 truncate text-left items-center" >
78- { chain . icon && (
79- < ChainIconClient
80- className = "size-6"
81- client = { client }
82- loading = "lazy"
83- src = { chain . icon ?. url }
84- />
85- ) }
86- { cleanChainName ( chain . name ) }
87- </ span >
88-
89- < Badge className = "gap-2" variant = "outline" >
90- < span className = "text-muted-foreground" > Chain ID</ span >
91- { chain . chainId }
92- </ Badge >
93- </ CardContent >
94- </ Card >
95- </ div >
96-
97- { PRODUCTS . map ( ( product ) => {
98- const hasSku = chainSubscription . skus . includes ( product . sku ) ;
99-
100- // Map sku to chain service key
101- const skuToServiceKey : Record < string , string > = {
102- "chain:infra:account_abstraction" : "account-abstraction" ,
103- "chain:infra:insight" : "insight" ,
104- "chain:infra:rpc" : "rpc-edge" ,
105- } ;
106-
107- const serviceKey = skuToServiceKey [ product . sku ] ;
108- const chainService = chain . services . find (
109- ( s ) => s . service === serviceKey ,
110- ) ;
111- const serviceEnabled =
112- chainService ?. enabled ?? chainService ?. status === "enabled" ;
113-
114- let status : "active" | "pending" | "inactive" ;
115- if ( hasSku && serviceEnabled ) {
116- status = "active" ;
117- } else if ( hasSku && ! serviceEnabled ) {
118- status = "pending" ;
119- } else {
120- status = "inactive" ;
121- }
122-
123- return (
124- < InfraServiceCard
125- key = { product . sku }
126- status = { status }
127- title = { product . title }
128- />
129- ) ;
130- } ) }
131-
132- < Separator />
133- { /* Subscription summary */ }
134- < Card >
135- < CardContent className = "flex flex-col gap-4 p-6 md:flex-row md:items-center md:justify-between" >
136- { /* Left: header + info */ }
137- < div className = "flex flex-col gap-2" >
138- < div className = "flex gap-2" >
139- < h3 className = "text-lg font-semibold" > Subscription details </ h3 >
140- { chainSubscription . isLegacy && (
141- < Badge className = "gap-0.5" variant = "outline" >
142- < span > Enterprise</ span >
143- < ToolTipLabel
144- label = {
145- < span className = "text-xs font-normal" >
146- This subscription is part of an enterprise agreement and
147- cannot be modified through the dashboard. Please contact
148- your account executive for any modifications.
149- </ span >
150- }
151- >
152- < InfoIcon className = "size-3 ml-1 cursor-help" />
153- </ ToolTipLabel >
154- </ Badge >
155- ) }
69+ < div className = "pb-20" >
70+ < div className = "border-b py-10" >
71+ { /* header */ }
72+ < div className = "container max-w-7xl" >
73+ < div className = "flex mb-4" >
74+ < div className = "rounded-full border bg-card p-2" >
75+ < ChainIconClient
76+ className = "size-8"
77+ client = { client }
78+ loading = "lazy"
79+ src = { chain . icon ?. url }
80+ />
15681 </ div >
82+ </ div >
83+
84+ < h2 className = "text-3xl font-semibold tracking-tight" >
85+ { cleanChainName ( chain . name ) } Infrastructure
86+ </ h2 >
87+ </ div >
88+ </ div >
15789
158- < div className = "flex flex-col gap-2 md:flex-row md:items-center md:gap-8" >
159- < div className = "flex gap-2 items-center" >
160- < span className = "text-muted-foreground" > Renews on</ span >
161- < span > { formattedRenewalDate } </ span >
90+ < div className = "container max-w-7xl pt-8 flex flex-col gap-8" >
91+ { PRODUCTS . map ( ( product ) => {
92+ const hasSku = chainSubscription . skus . includes ( product . sku ) ;
93+
94+ // Map sku to chain service key
95+ const skuToServiceKey : Record < string , string > = {
96+ "chain:infra:account_abstraction" : "account-abstraction" ,
97+ "chain:infra:insight" : "insight" ,
98+ "chain:infra:rpc" : "rpc-edge" ,
99+ } ;
100+
101+ const serviceKey = skuToServiceKey [ product . sku ] ;
102+ const chainService = chain . services . find (
103+ ( s ) => s . service === serviceKey ,
104+ ) ;
105+ const serviceEnabled =
106+ chainService ?. enabled ?? chainService ?. status === "enabled" ;
107+
108+ let status : "active" | "pending" | "inactive" ;
109+ if ( hasSku && serviceEnabled ) {
110+ status = "active" ;
111+ } else if ( hasSku && ! serviceEnabled ) {
112+ status = "pending" ;
113+ } else {
114+ status = "inactive" ;
115+ }
116+
117+ return (
118+ < InfraServiceCard
119+ key = { product . sku }
120+ status = { status }
121+ title = { product . title }
122+ />
123+ ) ;
124+ } ) }
125+
126+ < Separator />
127+ { /* Subscription summary */ }
128+ < Card >
129+ < CardContent className = "flex flex-col gap-4 p-6 md:flex-row md:items-center md:justify-between" >
130+ { /* Left: header + info */ }
131+ < div className = "flex flex-col gap-2" >
132+ < div className = "flex gap-2" >
133+ < h3 className = "text-lg font-semibold" > Subscription details </ h3 >
134+ { chainSubscription . isLegacy && (
135+ < Badge className = "gap-0.5" variant = "outline" >
136+ < span > Enterprise</ span >
137+ < ToolTipLabel
138+ label = {
139+ < span className = "text-xs font-normal" >
140+ This subscription is part of an enterprise agreement
141+ and cannot be modified through the dashboard. Please
142+ contact your account executive for any modifications.
143+ </ span >
144+ }
145+ >
146+ < InfoIcon className = "size-3 ml-1 cursor-help" />
147+ </ ToolTipLabel >
148+ </ Badge >
149+ ) }
162150 </ div >
163151
164- < div className = "flex gap-2 items-center" >
165- < span className = "text-muted-foreground" > Amount due</ span >
166- < span > { formattedAmountDue } </ span >
152+ < div className = "flex flex-col gap-2 md:flex-row md:items-center md:gap-8" >
153+ < div className = "flex gap-2 items-center" >
154+ < span className = "text-muted-foreground" > Renews on</ span >
155+ < span > { formattedRenewalDate } </ span >
156+ </ div >
157+
158+ < div className = "flex gap-2 items-center" >
159+ < span className = "text-muted-foreground" > Amount due</ span >
160+ < span > { formattedAmountDue } </ span >
161+ </ div >
167162 </ div >
168163 </ div >
169- </ div >
170- </ CardContent >
171- </ Card >
164+ </ CardContent >
165+ </ Card >
166+ </ div >
172167 </ div >
173168 ) ;
174169}
0 commit comments