#Remove/hide stuff from the Admin Dashboard
15 messages · Page 1 of 1 (latest)
https://github.com/Tech-Labi/medusa-marketplace-plugin/blob/dev/src/patch-admin.ts
maybe something like this would help u in removing pages
Thanks! I will read though this and tell if it fitted my needs.
Perfect! This is exactly what I needed! I don't clearly understand it yet. How does it work in production?
u have a post install in the package json section it basically runs after u do npm install
if u go to github proj root it should be a simple guide
I've spent 2 hours trying to remove the Orders page, and make the Products page the default.
If you have any advice, I'd really appriciate it!
I managed to do it. No problem anymore.
do you mind sharing the code snippet for this?
Which one would you like?
// 4) change default login redirect from /orders to /products
LOGIN_PATHS.forEach((path: string) => {
lines = readFileAsLines(path);
for (let i = 0; i < lines.length; i++) {
if (lines[i].includes('location.state?.from?.pathname || "/orders"')) {
lines[i] = lines[i].replace("/orders", "/products");
}
}
writeFile(lines, path);
});