docs: update admin extension docs (#4778)
* docs: update admin extension docs * eslint fixes * fix broken links * fix broken link * added admin upgrade guide * fix lint errors
This commit is contained in:
@@ -2,9 +2,6 @@
|
||||
title: 'How to Create an Admin UI Route'
|
||||
description: 'Learn how to create a new route in the admin dashboard.'
|
||||
addHowToData: true
|
||||
badge:
|
||||
variant: orange
|
||||
text: beta
|
||||
---
|
||||
|
||||
In this document, you’ll learn how to create a new route in the admin dashboard.
|
||||
@@ -29,12 +26,6 @@ If you want to create a page under the Settings page, please refer to [this docu
|
||||
|
||||
It’s assumed you already have a Medusa backend with the admin plugin installed before you move forward with this guide. If not, you can follow [this documentation page](../create-medusa-app.mdx) to install a Medusa project.
|
||||
|
||||
Furthermore, Admin UI Routes are currently available as a beta feature. So, you must install the `beta` version of the `@medusajs/admin` and `@medusajs/medusa` packages:
|
||||
|
||||
```bash npm2yarn
|
||||
npm install @medusajs/admin@beta @medusajs/medusa@beta
|
||||
```
|
||||
|
||||
### (Optional) TypeScript Preparations
|
||||
|
||||
Since routes are React components, they should be written in `.tsx` or `.jsx` files. If you’re using Typescript, you need to make some adjustments to avoid Typescript errors in your Admin files.
|
||||
@@ -190,7 +181,7 @@ For example:
|
||||
```tsx
|
||||
import { Post } from "../../../../../models/post"
|
||||
import PostForm from "../../../../components/post/form"
|
||||
import { RouteProps } from "@medusajs/admin-ui"
|
||||
import { RouteProps } from "@medusajs/admin"
|
||||
|
||||
const BlogPostCreatePage = ({
|
||||
notify,
|
||||
|
||||
Reference in New Issue
Block a user