docs: added a note about admin customizations as arrow functions (#8387)
This commit is contained in:
@@ -32,6 +32,12 @@ export default CustomPage
|
|||||||
|
|
||||||
The new page’s path is the file’s path relative to `src/admin/routes`. So, the above UI route is a new page added at the path `localhost:9000/app/custom`.
|
The new page’s path is the file’s 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
|
## Test the UI Route
|
||||||
|
|||||||
@@ -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 product’s details.
|
In the example above, the widget is injected at the top of a product’s details.
|
||||||
|
|
||||||
|
<Note title="Important" type="warning">
|
||||||
|
|
||||||
|
The widget component must be created as an arrow function.
|
||||||
|
|
||||||
|
</Note>
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Test the Widget
|
## Test the Widget
|
||||||
|
|||||||
Reference in New Issue
Block a user