Skip to content

Commit

Permalink
fix: fix #8
Browse files Browse the repository at this point in the history
  • Loading branch information
einazare committed Mar 6, 2020
1 parent 75c62fb commit c8a852f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/layouts/Admin/Admin.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/
import React from "react";
import { Route, Switch } from "react-router-dom";
import { Route, Switch, Redirect } from "react-router-dom";
// javascript plugin used to create scrollbars on windows
import PerfectScrollbar from "perfect-scrollbar";

Expand Down Expand Up @@ -133,7 +133,10 @@ class Admin extends React.Component {
toggleSidebar={this.toggleSidebar}
sidebarOpened={this.state.sidebarOpened}
/>
<Switch>{this.getRoutes(routes)}</Switch>
<Switch>
{this.getRoutes(routes)}
<Redirect from="*" to="/admin/dashboard"/>
</Switch>
{// we don't want the Footer to be rendered on map page
this.props.location.pathname.indexOf("maps") !== -1 ? null : (
<Footer fluid />
Expand Down

0 comments on commit c8a852f

Please sign in to comment.