From 65b168a2febcc73b233a3ecde7378f1e40ba1500 Mon Sep 17 00:00:00 2001 From: Yasmim Rosa Date: Tue, 12 Dec 2023 22:49:23 -0300 Subject: [PATCH] =?UTF-8?q?rotas=20por=20tipo=20de=20usu=C3=A1rio?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/pages/Signin/index.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/frontend/src/pages/Signin/index.js b/frontend/src/pages/Signin/index.js index a727c416..fc3379df 100644 --- a/frontend/src/pages/Signin/index.js +++ b/frontend/src/pages/Signin/index.js @@ -28,9 +28,12 @@ const Signin = () => { if (response.data.accessToken) { sessionStorage.setItem("accessToken", response.data.accessToken); - sessionStorage.setItem("user", JSON.stringify({email, senha})); + sessionStorage.setItem("superuser", response.data.superuser); + signin(); - + console.log("oi") + console.log( sessionStorage.getItem("superuser")) + console.log(isSuperUser()) navigate("/home");