How to properly extend MedusaJS v2 product detail page with custom drawer routes? #13473
Unanswered
radeknapora
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Issue Description
I'm trying to extend the existing MedusaJS v2 product detail page by adding a custom drawer route that overlays on top of the original product page content. However, I'm experiencing issues with the routing setup where either:
Current Setup
Project Structure:
Custom Drawer Component (
@edites/page.tsx
):Questions
What's the correct way to extend an existing MedusaJS admin page while preserving the original content and functionality?
How should I structure the routing to have:
/a/products/123
→ Show original MedusaJS product detail page/a/products/123/edites
→ Show original page + drawer overlayShould I be using widgets instead of route overrides for this use case? If so, how do I create a widget that can open a drawer with custom forms?
How do I properly import/reference the original MedusaJS product detail component if I need to wrap it with additional functionality?
Expected Behavior
When navigating to
/a/products/123/edites
, I expect:Environment
Additional Context
I've explored the MedusaJS dashboard source code and see that the original
ProductDetail
component usesTwoColumnPage
withhasOutlet={true}
, but I'm struggling to understand the proper way to extend this functionality without breaking the original page.Any guidance on the recommended approach for extending admin pages with custom drawer routes would be greatly appreciated!
Beta Was this translation helpful? Give feedback.
All reactions