I am using [creative time free react dashboard][1]. I am not able to change the url path of a page.
I have create a route in the routes.js:
{
id: 7,
path: "/forgot-password",
invisible: true,
name: "P.I. Operations",
icon: "nc-icon nc-single-02",
component: ForgotPassword,
layout: "/admin",
},
In the index.js of the app i have added the route like this:
<Route
path="/forgot-password"
render={(props) => <ForgotPasswordLayout {...props} />}
/>
When ever i visit the http://localhost:3000/forgot-password I just git a blank page. I have been trying to fix this for the last few days. I request you guys to help me fix this, thanks in advance. [1]: https://www.creative-tim.com/product/material-dashboard-material-ui-v4
The solution to this problem is to use the component prop or add the component as children in the <Route> component.
<Route
path="/forgot-password"
component={ForgotPasswordLayout}
/>
// OR
<Route path="/forgot-password">
<ForgotPasswordLayout />
</Route>