diff --git a/frontend/index.html b/frontend/index.html index c30d98b..bbd252d 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -4,6 +4,13 @@ Temperature Alarm +
diff --git a/frontend/shared/utils.js b/frontend/shared/utils.js index 3bbd6c1..2493d3a 100644 --- a/frontend/shared/utils.js +++ b/frontend/shared/utils.js @@ -50,3 +50,7 @@ export function getUser() { return JSON.parse(localStorage.getItem("user")); } +export function isLoggedIn() { + return document.cookie.match(/\bauth-token=/) && localStorage.getItem("user"); +} +