From d8c4ffe31a37e6f75ea38c9d3ad1466ed8ea84db Mon Sep 17 00:00:00 2001 From: Rian Fuzinelli Date: Wed, 22 Apr 2026 18:41:37 -0300 Subject: [PATCH] =?UTF-8?q?fix:=20corre=C3=A7=C3=A3o=20de=20blank=20screen?= =?UTF-8?q?=20p=C3=B3s=20autentica=C3=A7=C3=A3o=20de=20usu=C3=A1rio?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db.json | 6 +++--- usuario/usuario.html | 2 +- usuario/usuario.js | 5 +++-- usuarioclass.js | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/db.json b/db.json index dae1bf1..2e409b0 100644 --- a/db.json +++ b/db.json @@ -18,10 +18,10 @@ }, { "id": 4, - "title": "gg", - "description": "gedg", + "title": "dassda", + "description": "", "status": "Pendente", - "date": "16/04/2026", + "date": "22/04/2026", "userId": 1 } ], diff --git a/usuario/usuario.html b/usuario/usuario.html index 581d686..c1743a8 100644 --- a/usuario/usuario.html +++ b/usuario/usuario.html @@ -35,7 +35,7 @@

TaskMaster

- + diff --git a/usuario/usuario.js b/usuario/usuario.js index 7760ff7..12d8b86 100644 --- a/usuario/usuario.js +++ b/usuario/usuario.js @@ -1,11 +1,12 @@ const userData = JSON.parse(localStorage.getItem('user')); -const user = new Usuario(userData); const LINK_JSON = "http://localhost:3000"; -if (!user) { +if (!userData) { window.location.href = '/index.html'; } +const user = new Usuario(userData); + const statusConfig = { "Completa": { classe: "completa", diff --git a/usuarioclass.js b/usuarioclass.js index cb22e30..54c646a 100644 --- a/usuarioclass.js +++ b/usuarioclass.js @@ -12,4 +12,4 @@ class Usuario { } } -module.exports = Usuario; \ No newline at end of file +if (typeof module !== 'undefined') module.exports = Usuario; \ No newline at end of file