From 7865c91b7313e57c3e7e220677d05f8319cfed18 Mon Sep 17 00:00:00 2001 From: Judith Kraziewicz Date: Mon, 26 Feb 2024 10:32:45 +0000 Subject: [PATCH 1/9] add button to list.jsx --- src/views/List.jsx | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/src/views/List.jsx b/src/views/List.jsx index a354420..9f8666b 100644 --- a/src/views/List.jsx +++ b/src/views/List.jsx @@ -16,12 +16,21 @@ export function List({ data }) {

You are on the {path} list!

- - + {data.length === 0 ? ( +
+

Well done! You have created your a new list!

+ +
+ ) : ( +
+ +
    + {newList.map((item) => ( + + ))} +
+
+ )} ); } From cae051ea720447d991946559577efb6875fcd7f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9line?= <114222588+ocsiddisco@users.noreply.github.com> Date: Mon, 26 Feb 2024 11:51:51 +0100 Subject: [PATCH 2/9] add navigation to manage-list page --- src/views/List.jsx | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/views/List.jsx b/src/views/List.jsx index 9f8666b..90ab095 100644 --- a/src/views/List.jsx +++ b/src/views/List.jsx @@ -1,11 +1,12 @@ import { useState, useEffect } from 'react'; import { ListItem } from '../components'; import SearchList from '../components/SearchList'; -import { useParams } from 'react-router-dom'; +import { useParams, useNavigate } from 'react-router-dom'; export function List({ data }) { const [newList, setNewList] = useState([]); const { path } = useParams(); + const navigate = useNavigate(); useEffect(() => { setNewList(data); @@ -18,8 +19,15 @@ export function List({ data }) { {data.length === 0 ? (
-

Well done! You have created your a new list!

- +

Well done! You have created a new list!

+

+ You can start adding some items and specify when you need to + purchase them. +

+ +
) : (
From 0770125aa83f9248a45b2041913fb993770778c1 Mon Sep 17 00:00:00 2001 From: Judith Kraziewicz Date: Mon, 26 Feb 2024 11:09:26 +0000 Subject: [PATCH 3/9] add time specification to managelist.jsx --- src/views/ManageList.jsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/views/ManageList.jsx b/src/views/ManageList.jsx index a0cdc87..bf45752 100644 --- a/src/views/ManageList.jsx +++ b/src/views/ManageList.jsx @@ -83,13 +83,13 @@ export function ManageList({ listPath, userId, userEmail }) { -
+