docs: added a note about admin customizations as arrow functions (#8387)

This commit is contained in:
Shahed Nasser
2024-08-06 10:44:22 +03:00
committed by GitHub
parent f04adaf0c1
commit decd830474
2 changed files with 12 additions and 0 deletions

View File

@@ -32,6 +32,12 @@ export default CustomPage
The new pages path is the files path relative to `src/admin/routes`. So, the above UI route is a new page added at the path `localhost:9000/app/custom`.
<Note title="Important" type="warning">
The UI route component must be created as an arrow function.
</Note>
---
## Test the UI Route

View File

@@ -56,6 +56,12 @@ Use the `defineWidgetConfig` function imported from `@medusajs/admin-shared` to
In the example above, the widget is injected at the top of a products details.
<Note title="Important" type="warning">
The widget component must be created as an arrow function.
</Note>
---
## Test the Widget