File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed
Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -38,8 +38,9 @@ export default async function CatalogPage() {
3838 version : it ?. server ?. version ?? undefined ,
3939 } ) ) ;
4040 serversSummary = { count : items . length , titles, sample } ;
41- } catch {
42- // Leave serversSummary at its default empty state
41+ } catch ( error ) {
42+ // Log the error for debugging
43+ console . error ( "[catalog] Failed to fetch servers:" , error ) ;
4344 }
4445
4546 return (
Original file line number Diff line number Diff line change @@ -20,4 +20,13 @@ export type CreateClientConfig<T extends ClientOptions = ClientOptions2> = (
2020 override ?: Config < ClientOptions & T > ,
2121) => Config < Required < ClientOptions > & T > ;
2222
23- export const client = createClient ( createConfig < ClientOptions2 > ( ) ) ;
23+ // Configure client with baseUrl for both SSR and client-side
24+ // In development: points to standalone MSW mock server (http://localhost:9090)
25+ // In production: points to real backend API
26+ const baseUrl = process . env . NEXT_PUBLIC_API_BASE_URL || "http://localhost:9090" ;
27+
28+ export const client = createClient (
29+ createConfig < ClientOptions2 > ( {
30+ baseUrl,
31+ } ) ,
32+ ) ;
You can’t perform that action at this time.
0 commit comments