From e51c4570fd2d269daa29aefe641fec20585ff80b Mon Sep 17 00:00:00 2001 From: eonflower Date: Thu, 1 Feb 2024 18:11:17 -0800 Subject: [PATCH 1/4] Added myself (aloe) to the contributors markdown --- CONTRIBUTORS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index a7af219..122f2a2 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -7,6 +7,7 @@ Add yourself as a contributor to this project as a Markdown link that links your ## Cohort Participants - [Stefanie Caffarel](https://github.com/stefiecaff) 🐌 +- [Aloe Nelson](https://github.com/eonflower) ✨ ## Mentors From 8c9e8ce8bbaa05e32fd9cff9194dff5215761ea8 Mon Sep 17 00:00:00 2001 From: ecampos Date: Fri, 2 Feb 2024 00:10:14 -0600 Subject: [PATCH 2/4] Add Emilio to CONTRIBUTORS --- CONTRIBUTORS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 122f2a2..4004cba 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -8,6 +8,7 @@ Add yourself as a contributor to this project as a Markdown link that links your - [Stefanie Caffarel](https://github.com/stefiecaff) 🐌 - [Aloe Nelson](https://github.com/eonflower) ✨ +- [Emilio Campos](https://github.com/3campos) 🧙‍♂️ ## Mentors From 8a15c14ded142c99da8da93d95842896acbfa356 Mon Sep 17 00:00:00 2001 From: ecampos Date: Wed, 3 Apr 2024 13:31:21 -0500 Subject: [PATCH 3/4] add try catch to localStorageListName in NavigationBarSingleList component --- src/components/NavigationBarSingleList.jsx | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/components/NavigationBarSingleList.jsx b/src/components/NavigationBarSingleList.jsx index 1a352f4..d6d312f 100644 --- a/src/components/NavigationBarSingleList.jsx +++ b/src/components/NavigationBarSingleList.jsx @@ -21,11 +21,18 @@ export function NavigationBarSingleList({ window.location.pathname.substring( window.location.pathname.lastIndexOf('/') + 1, ) === 'list'; - const localStorageListName = localStorage - .getItem('tcl-shopping-list-path') - .substring( - localStorage.getItem('tcl-shopping-list-path').lastIndexOf('/') + 1, - ); + + const localStorageListName = () => { + try { + localStorage + .getItem('tcl-shopping-list-path') + .substring( + localStorage.getItem('tcl-shopping-list-path').lastIndexOf('/') + 1, + ); + } catch (e) { + console.error('error', e); + } + }; return (
  • Date: Thu, 4 Apr 2024 00:31:27 -0500 Subject: [PATCH 4/4] fix blue coloring to nav bar single list element that is in the list view --- src/components/NavigationBarSingleList.jsx | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/src/components/NavigationBarSingleList.jsx b/src/components/NavigationBarSingleList.jsx index d6d312f..8210080 100644 --- a/src/components/NavigationBarSingleList.jsx +++ b/src/components/NavigationBarSingleList.jsx @@ -22,22 +22,18 @@ export function NavigationBarSingleList({ window.location.pathname.lastIndexOf('/') + 1, ) === 'list'; - const localStorageListName = () => { - try { - localStorage - .getItem('tcl-shopping-list-path') - .substring( - localStorage.getItem('tcl-shopping-list-path').lastIndexOf('/') + 1, - ); - } catch (e) { - console.error('error', e); - } - }; + const localStorageListName = + localStorage + ?.getItem('tcl-shopping-list-path') + ?.substring( + localStorage.getItem('tcl-shopping-list-path').lastIndexOf('/') + 1, + ) || ''; return (
  • + {/*The above hex code (#ebf5ff) only worked in the ternary operator in lowercase format, not uppercase.*/} {/* Using Link instead of button */} ); } - -// <... className={`flex items-center space-x-2 px-4 py-5 transition duration-500 ease-in-out transform hover:-translate-y-1 hover:scale-110 border-l-4 border-white ${window.location.pathname === '/' ? 'border-red-200' : ''}`}>