import { builder } from "@builder.io/sdk";
import { RenderBuilderContent } from "@/components/builder";
builder.init(process.env.NEXT_PUBLIC_BUILDER_API_KEY!);
export default async function Page() {
const builderModelName = "page";
const content = await builder
.get(builderModelName, {
userAttributes: {
urlPath: "/login",
},
})
.toPromise();
return <RenderBuilderContent content={content} model={builderModelName} />;
}
Above is the code for fetching page data from the page
model I created in Builder.io works correctly on my colleague’s laptop and in the dev environment after deployment. However, on my local machine, the content is undefined. We are unable to identify the cause of this issue.
Note:- i am using proper builder key.