Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The footer and navbar are overlapping when wrong path is entered in the url #8

Closed
Robel-GH opened this issue Jul 8, 2019 · 1 comment · Fixed by #14
Closed

The footer and navbar are overlapping when wrong path is entered in the url #8

Robel-GH opened this issue Jul 8, 2019 · 1 comment · Fixed by #14
Labels
enhancement New feature or request

Comments

@Robel-GH
Copy link

Robel-GH commented Jul 8, 2019

What is expected ?
To raise 404
Opera Snapshot_2019-07-08_120124_localhost

@einazare
Copy link
Contributor

einazare commented Jul 8, 2019

Hello there, @Robel-GH ,

Thank you for your interest in working with our products.
First of all, let me ask you, why did you not follow our rules?

<!--
 IMPORTANT: Please use the following link to create a new issue:

  https://www.creative-tim.com/new-issue/black-dashboard-react

**If your issue was not created using the app above, it will be closed immediately.**
-->

<!--
Love Creative Tim? Do you need Angular, React, Vuejs or HTML? You can visit:
👉  https://www.creative-tim.com/bundles
👉  https://www.creative-tim.com
-->

If I had seen that you did not use our issue template, I would have closed your issue without the bellow solution.

This being said, please go inside src/layouts/Admin/Admin.jsx and add the following import:

import { Redirect } from "react-router-dom";

Then, change this line:

<Switch>{this.getRoutes(routes)}</Switch>

To:

<Switch>
   {this.getRoutes(routes)}
  <Redirect from="/admin" to="/path/to/your/404/page" />
</Switch>

Please note that "/path/to/your/404/page" you need to change this.

In our next update we are going to say:

<Switch>
   {this.getRoutes(routes)}
  <Redirect from="/admin" to="/admin/dashboard" />
</Switch>

Hope this helps.

Best,
Manu

@einazare einazare added the enhancement New feature or request label Jul 8, 2019
einazare added a commit that referenced this issue Mar 6, 2020
einazare added a commit that referenced this issue Mar 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants