Skip to content
Snippets Groups Projects
Commit 078a9d46 authored by Gabriel Silva Hermida's avatar Gabriel Silva Hermida
Browse files

Issue #50: Fix redirecionamento rotas

parent a30c714f
No related branches found
No related tags found
1 merge request!49Issue #50: Fix redirecionamento rotas
...@@ -12,11 +12,10 @@ import VisualizeForm from "./pages/VisualizeForm"; ...@@ -12,11 +12,10 @@ import VisualizeForm from "./pages/VisualizeForm";
import { BrowserRouter, Route, Switch, Redirect } from "react-router-dom"; import { BrowserRouter, Route, Switch, Redirect } from "react-router-dom";
const PrivateRoute = ({ component: Component, ...rest }) => { const PrivateRoute = ({ component: Component, ...rest }) => {
let usr; let usr = true;
rest.path === "/list/:id" && rest.path === "/list/:id" &&
rest.computedMatch.params.id === window.sessionStorage.getItem("userId") && rest.computedMatch.params.id !== window.sessionStorage.getItem("userId") &&
(usr = true); (usr = false);
return ( return (
<Route <Route
{...rest} {...rest}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment