Skip to content

Commit

Permalink
Merge pull request #20 from the-collab-lab/ec/an-issue-1
Browse files Browse the repository at this point in the history
2. As a user, I want to read all of my shopping lists and the items in them.
  • Loading branch information
eonflower authored Feb 8, 2024
2 parents fafba9e + f4f162d commit 8810c9a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
13 changes: 9 additions & 4 deletions src/views/Home.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import './Home.css';
import { SingleList } from '../components/SingleList';

export function Home({ data, setListPath }) {
return (
Expand All @@ -7,10 +8,14 @@ export function Home({ data, setListPath }) {
Hello from the home (<code>/</code>) page!
</p>
<ul>
{/**
* TODO: write some JavaScript that renders the `lists` array
* so we can see which lists the user has access to.
*/}
{data.map((list) => (
<SingleList
key={list.name}
name={list.name}
path={list.path}
setListPath={setListPath}
/>
))}
</ul>
</div>
);
Expand Down
10 changes: 4 additions & 6 deletions src/views/List.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ListItem } from '../components';
import { ListItem } from '../components/ListItem';

export function List({ data }) {
return (
Expand All @@ -7,11 +7,9 @@ export function List({ data }) {
Hello from the <code>/list</code> page!
</p>
<ul>
{/**
* TODO: write some JavaScript that renders the `data` array
* using the `ListItem` component that's imported at the top
* of this file.
*/}
{data.map((item) => (
<ListItem key={item.name} name={item.name} />
))}
</ul>
</>
);
Expand Down

0 comments on commit 8810c9a

Please sign in to comment.