Skip to content

Commit

Permalink
Correct error in DO_NOT_READ_ME
Browse files Browse the repository at this point in the history
  • Loading branch information
mathiasbergqvist committed Mar 11, 2022
1 parent bcf907c commit f5c552e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion lab3/DO_NOT_README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ I `userActions.js`:

```javascript
.then((users) => {
useDispatch({
dispatch({
type: USERS_RECEIVED,
payload: users
})
Expand Down
21 changes: 10 additions & 11 deletions lab3/src/components/List/List.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import "./List.css";
const List = ({ title }) => {
const [searchTerm, setSearchTerm] = useState("");

// Task 7: Get users from store
// Task 6: Get users from store
const users = [];

const onItemClick = (userId) => {
Expand All @@ -32,16 +32,15 @@ const List = ({ title }) => {
<div className="alert alert-warning">Empty list...</div>
) : (
<ul className="list-group">
{
filteredUsers.map((item) => (
<li
className="List-item list-group-item"
key={item.id}
onClick={(e) => onItemClick(item.id)}
>
{item.name}
</li>
))}
{filteredUsers.map((item) => (
<li
className="List-item list-group-item"
key={item.id}
onClick={(e) => onItemClick(item.id)}
>
{item.name}
</li>
))}
</ul>
)}
</div>
Expand Down

0 comments on commit f5c552e

Please sign in to comment.