Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ec issue #29 bug fix - Lists in the Nav Bar throw error when local storage is empty #60

Merged
merged 19 commits into from
Apr 4, 2024
Merged
Changes from 17 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
e51c457
Added myself (aloe) to the contributors markdown
eonflower Feb 2, 2024
8c9e8ce
Add Emilio to CONTRIBUTORS
3campos Feb 2, 2024
bdf3fb2
Merge branch 'main' of https://github.com/the-collab-lab/tcl-66-smart…
3campos Feb 6, 2024
561d709
commit before pull
3campos Feb 10, 2024
1d7b5ef
Merge branch 'main' of https://github.com/the-collab-lab/tcl-66-smart…
3campos Feb 10, 2024
f2a7b21
Merge branch 'main' of https://github.com/the-collab-lab/tcl-66-smart…
3campos Feb 12, 2024
6e973e5
Merge branch 'main' of https://github.com/the-collab-lab/tcl-66-smart…
3campos Feb 14, 2024
9e11d2b
Merge branch 'main' of https://github.com/the-collab-lab/tcl-66-smart…
3campos Feb 17, 2024
196c6dc
Merge branch 'main' of https://github.com/the-collab-lab/tcl-66-smart…
3campos Feb 26, 2024
a7be9ab
Merge branch 'main' of https://github.com/the-collab-lab/tcl-66-smart…
3campos Feb 29, 2024
e0d8e4b
Merge branch 'main' of https://github.com/the-collab-lab/tcl-66-smart…
3campos Mar 1, 2024
e9b6c26
Merge branch 'main' of https://github.com/the-collab-lab/tcl-66-smart…
3campos Mar 7, 2024
38592ce
Merge branch 'main' of https://github.com/the-collab-lab/tcl-66-smart…
3campos Mar 10, 2024
6d2090a
Merge branch 'main' of https://github.com/the-collab-lab/tcl-66-smart…
3campos Mar 26, 2024
b8e12b5
Merge branch 'main' of https://github.com/the-collab-lab/tcl-66-smart…
3campos Apr 2, 2024
97c6f74
Merge branch 'main' of https://github.com/the-collab-lab/tcl-66-smart…
3campos Apr 3, 2024
8a15c14
add try catch to localStorageListName in NavigationBarSingleList comp…
3campos Apr 3, 2024
660c7b6
fix blue coloring to nav bar single list element that is in the list …
3campos Apr 4, 2024
31ee93d
Merge branch 'main' into ec-issue-29-bug-fix
3campos Apr 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions src/components/NavigationBarSingleList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<li
Expand Down
Loading