Closed locmai0808 closed 4 years ago
Hello there, @locmai0808 ,
I've checked our product and it works as expected.
As I can see on the links you have given me, you have made changed to our product.
Inside src/layouts/Admin/Admin.js
inside the <Switch>...</Switch>
component, you need to have a Redirect
:
<Switch>
{this.getRoutes(routes)}
<Redirect from="*" to="/admin/dashboard" />
</Switch>
Also, please note this is not an issue with the product.
Best, Manu
@EINazare Thanks! That fixed the issue.
Version
1.0.0
Reproduction link
https://code.lnmai.com/#/admin/dashboard
Operating System
Windows
Device
Desktop
Browser & Version
Chrome 80
Steps to reproduce
What is expected?
Expected the app would redirect to https://code.lnmai.com/#/admin/dashboard instead of staying on https://code.lnmai.com/#/admin/invalid
What is actually happening?
App wont redirect upon invalid route.
Solution
Additional comments
According to your demo page here: https://demos.creative-tim.com/black-dashboard-pro-react/#/admin/dashboard When you go to https://demos.creative-tim.com/black-dashboard-pro-react/#/admin/invalid, it would redirect to dashboard, without refreshing the page.