From decd8304747ec963a1fdc7cd79e4e4897ca20f98 Mon Sep 17 00:00:00 2001 From: Shahed Nasser Date: Tue, 6 Aug 2024 10:44:22 +0300 Subject: [PATCH] docs: added a note about admin customizations as arrow functions (#8387) --- .../book/app/advanced-development/admin/ui-routes/page.mdx | 6 ++++++ .../book/app/advanced-development/admin/widgets/page.mdx | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/www/apps/book/app/advanced-development/admin/ui-routes/page.mdx b/www/apps/book/app/advanced-development/admin/ui-routes/page.mdx index 8288f44d72..908b32d466 100644 --- a/www/apps/book/app/advanced-development/admin/ui-routes/page.mdx +++ b/www/apps/book/app/advanced-development/admin/ui-routes/page.mdx @@ -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 UI route component must be created as an arrow function. + + + --- ## Test the UI Route diff --git a/www/apps/book/app/advanced-development/admin/widgets/page.mdx b/www/apps/book/app/advanced-development/admin/widgets/page.mdx index 86453692b2..65c292866a 100644 --- a/www/apps/book/app/advanced-development/admin/widgets/page.mdx +++ b/www/apps/book/app/advanced-development/admin/widgets/page.mdx @@ -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. + + +The widget component must be created as an arrow function. + + + --- ## Test the Widget