medusajs / medusa

Building blocks for digital commerce
https://medusajs.com
MIT License
24.29k stars 2.37k forks source link

Issue Creating Custom Admin Page/Route with Medusa v2 #7997

Open usmanjaved02 opened 1 month ago

usmanjaved02 commented 1 month ago

Bug report

Describe the bug

I'm trying to create a custom page/route using the v2 documentation (https://docs.medusajs.com/v2/advanced-development/admin/ui-routes), but I keep getting errors saying that certain files don't exist.

System information

Medusa version (including plugins): v2 Node.js version: 21.7.3 Database: postgres Operating system: Windows Browser (if relevant): Google Chrome

Screenshots

WhatsApp Image 2024-07-07 at 1 29 03 AM

WhatsApp Image 2024-07-07 at 1 30 08 AM

kasperkristensen commented 1 month ago

Hi @usmanjaved02, could I get you to try again with the latest version of the preview release?

usmanjaved02 commented 1 month ago

Hey @kasperkristensen The issue of custom page is resolved many thanks But I am unable to create the route on sidebar using following code

Documentation Link: https://docs.medusajs.com/v2/advanced-development/admin/ui-routes

import { defineRouteConfig } from "@medusajs/admin-shared" import { ChatBubbleLeftRight } from "@medusajs/icons" import { Container } from "@medusajs/ui"

const CustomPage = () => { return This is my custom route }

export const config = defineRouteConfig({ label: "Custom Route", icon: ChatBubbleLeftRight, })

export default CustomPage