In my router if I add "/" to my path its not routing. For example :
export const AppViews = () => {
return (
<Suspense fallback={<Loading cover="content" />}>
<Switch>
<Route
path={`${APP_PREFIX_PATH}/commons`}
component={lazy(() => import(`./commons`))}
/>
<Redirect
from={`${APP_PREFIX_PATH}`}
to={`${APP_PREFIX_PATH}/commons`}
/>
</Switch>
</Suspense>
);
};
Its not routing. ( " My app prefix path is " /v1" )
export const AppViews = () => {
return (
<Suspense fallback={<Loading cover="content" />}>
<Switch>
<Route
path={`${APP_PREFIX_PATH}`}
component={lazy(() => import(`./commons`))}
/>
</Switch>
</Suspense>
);
};
Its routing. Its kind a strange error for me and I can't found any solution about it. I tried add "exact" but it does not work too. Thank you for all replies!