removed app from routes

master
Tudor Stanciu 2021-07-31 02:39:50 +03:00
parent f1319614e5
commit 702c108db0
4 changed files with 23 additions and 32 deletions

View File

@ -26,14 +26,9 @@ export default function App() {
return (
<HashRouter basename={process.env.PUBLIC_URL || ""}>
<Switch>
<Route exact path="/" render={() => <Redirect to="/app/dashboard" />} />
<Route
exact
path="/app"
render={() => <Redirect to="/app/dashboard" />}
/>
<PrivateRoute path="/app" component={Layout} />
<Route exact path="/" render={() => <Redirect to="/dashboard" />} />
<PublicRoute path="/login" component={Login} />
<PrivateRoute path="/" component={Layout} />
<Route component={Error} />
</Switch>
</HashRouter>

View File

@ -31,18 +31,14 @@ const Content = () => {
>
<div className={classes.fakeToolbar} />
<Switch>
<Route path="/app/dashboard" component={Dashboard} />
<Route path="/app/typography" component={Typography} />
<Route path="/app/tables" component={Tables} />
<Route path="/app/notifications" component={Notifications} />
<Route
exact
path="/app/ui"
render={() => <Redirect to="/app/ui/icons" />}
/>
<Route path="/app/ui/maps" component={Maps} />
<Route path="/app/ui/icons" component={Icons} />
<Route path="/app/ui/charts" component={Charts} />
<Route path="/dashboard" component={Dashboard} />
<Route path="/typography" component={Typography} />
<Route path="/tables" component={Tables} />
<Route path="/notifications" component={Notifications} />
<Route exact path="/ui" render={() => <Redirect to="/ui/icons" />} />
<Route path="/ui/maps" component={Maps} />
<Route path="/ui/icons" component={Icons} />
<Route path="/ui/charts" component={Charts} />
</Switch>
<ContentFooter />
</div>

View File

@ -18,13 +18,13 @@ let menu = [
{
id: 0,
label: "Dashboard",
link: "/app/dashboard",
link: "/dashboard",
icon: <DashboardIcon />
},
{
id: 1,
label: "Resources",
link: "/app/resources",
link: "/resources",
icon: <ImageIcon />
},
@ -33,19 +33,19 @@ let menu = [
{
id: 4,
label: "Admin",
link: "/app/admin",
link: "/admin",
icon: <BuildIcon />
},
{
id: 5,
label: "Settings",
link: "/app/settings",
link: "/settings",
icon: <SettingsIcon />,
children: [
{
id: 50,
label: "Notifications",
link: "/app/notifications",
link: "/notifications",
icon: <NotificationsIcon />
}
]
@ -53,7 +53,7 @@ let menu = [
{
id: 6,
label: "Health",
link: "/app/health",
link: "/health",
icon: <NetworkCheckIcon />
},
{ id: 7, type: "divider" },
@ -91,19 +91,19 @@ if (enableTemplateContent) {
{
id: 14,
label: "Typography",
link: "/app/typography",
link: "/typography",
icon: <TypographyIcon />
},
{ id: 15, label: "Tables", link: "/app/tables", icon: <TableIcon /> },
{ id: 15, label: "Tables", link: "/tables", icon: <TableIcon /> },
{
id: 16,
label: "UI Elements",
link: "/app/ui",
link: "/ui",
icon: <UIElementsIcon />,
children: [
{ label: "Icons", link: "/app/ui/icons" },
{ label: "Charts", link: "/app/ui/charts" },
{ label: "Maps", link: "/app/ui/maps" }
{ label: "Icons", link: "/ui/icons" },
{ label: "Charts", link: "/ui/charts" },
{ label: "Maps", link: "/ui/maps" }
]
},
{

View File

@ -78,7 +78,7 @@ function loginUser(dispatch, login, password, history, setIsLoading, setError) {
}
});
history.push("/app/dashboard");
history.push("/dashboard");
} else {
setLoginFailed(dispatch, setError, setIsLoading, "Login.EmptyCredentials");
}