Skip to content

Commit

Permalink
functioning add item button added to list page
Browse files Browse the repository at this point in the history
  • Loading branch information
arandel1 committed Sep 24, 2024
1 parent c46af99 commit 679632b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/views/List.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ export function List({ data, userId }) {
setFilteredObject(filteredObject);
}, [filterVal, sortedList]);

const addItemNavigate = (e) => {
e.preventDefault();
window.location.href = '/manage-list';
};

return (
<>
<p>
Expand All @@ -60,8 +65,10 @@ export function List({ data, userId }) {
<BasicModal dataEmpty={dataEmpty} message={message} />
)}

<button onClick={addItemNavigate}> Add item</button>

<form onSubmit={clearInput}>
<label htmlFor="item-name">Item name:</label>
<label htmlFor="item-name">Search item: </label>
<input
id="item-name"
name="item-name"
Expand Down

0 comments on commit 679632b

Please sign in to comment.