File tree Expand file tree Collapse file tree 2 files changed +14
-10
lines changed
Expand file tree Collapse file tree 2 files changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -19,22 +19,23 @@ interface ObjectUIExampleProps {
1919}
2020
2121/**
22- * Example component showing how to integrate @object-ui components
22+ * Example component showing how to integrate @object-ui components.
23+ *
24+ * The SchemaRenderer will automatically fetch object metadata from the ObjectStack
25+ * backend and render the appropriate view based on the schema definition.
2326 */
2427export function ObjectUIExample ( {
2528 objectName,
2629 view = 'grid' ,
2730 recordId
2831} : ObjectUIExampleProps ) {
2932 return (
30- < div className = "object-ui-container" >
31- < SchemaRenderer
32- adapter = { objectUIAdapter }
33- objectName = { objectName }
34- view = { view }
35- recordId = { recordId }
36- />
37- </ div >
33+ < SchemaRenderer
34+ adapter = { objectUIAdapter }
35+ objectName = { objectName }
36+ view = { view }
37+ recordId = { recordId }
38+ />
3839 ) ;
3940}
4041
Original file line number Diff line number Diff line change @@ -12,12 +12,15 @@ import { createObjectStackAdapter } from '@object-ui/data-objectstack';
1212 *
1313 * This adapter allows ObjectUI components to fetch data from the ObjectStack backend
1414 * through the @objectstack/client API.
15+ *
16+ * Note: The adapter uses 'baseUrl' (not 'baseURL') as per the @objectstack/client API.
17+ * This follows Node.js URL conventions where 'baseUrl' is used for configuration.
1518 */
1619export const objectUIAdapter = createObjectStackAdapter ( {
17- // Base URL for ObjectStack API (note: baseUrl not baseURL)
1820 baseUrl : import . meta. env . VITE_API_BASE_URL || '/api/v1' ,
1921
2022 // Optional: Token for authentication (if not using cookies)
23+ // By default, the adapter uses cookie-based authentication from better-auth
2124 // token: 'your-auth-token',
2225} ) ;
2326
You can’t perform that action at this time.
0 commit comments