Skip to content
Snippets Groups Projects
Commit b6ae53aa authored by Gabriel Silva Hermida's avatar Gabriel Silva Hermida Committed by Stephanie Briere Americo
Browse files

Issue #50: Fix redirecionamento rotas

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