From f06b3cff1f8d200d7e2e3860a118beada0be678e Mon Sep 17 00:00:00 2001 From: Eivind Del Fierro Date: Wed, 5 Jul 2023 19:41:38 -0400 Subject: [PATCH 1/2] login component --- Client/components/login.jsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Client/components/login.jsx b/Client/components/login.jsx index 73faa83..3f8cd1c 100644 --- a/Client/components/login.jsx +++ b/Client/components/login.jsx @@ -13,9 +13,9 @@ const login = () => { const loginObj = { username : un, password : pw - } + }; - console.log(loginObj) + console.log(loginObj); fetch('http://localhost:3000/login', { method: 'POST', @@ -25,15 +25,15 @@ const login = () => { .then( data => data.json()) .then( data => { if (!data.err) { - console.log(data) + console.log(data); // Do something // change logged in user state with the returned userState - dispatch(actions.updateUSER_LOG_ON(data)) + dispatch(actions.updateUSER_LOG_ON(data)); // disable opacity document.getElementById("overlay").style.display = 'none' } else { - alert(data.err) + alert(data.err); } }) .catch(error => alert(error)) From e899910050d9f28f736ed111e292c2539852c43b Mon Sep 17 00:00:00 2001 From: Eivind Del Fierro Date: Thu, 6 Jul 2023 10:27:39 -0400 Subject: [PATCH 2/2] improved exercise menu logic --- Client/containers/StretchContainer.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Client/containers/StretchContainer.jsx b/Client/containers/StretchContainer.jsx index 644c5a1..74e367d 100644 --- a/Client/containers/StretchContainer.jsx +++ b/Client/containers/StretchContainer.jsx @@ -39,7 +39,8 @@ const StretchContainer = () => { } return ( -

No {difficulty} {muscle} exercises found!

+

No {difficulty !== 'null' ? difficulty : null}{' '} + {muscle !== 'null' ? muscle : null} exercises found!

) };