From 438cde06c9fd0c96c634781f831bf0d16ac65a6b Mon Sep 17 00:00:00 2001
From: Jean-Christophe <>
Date: Thu, 25 Jan 2024 11:11:07 +0100
Subject: [PATCH] modif persons data

---
 src/components/person.component.jsx        | 4 ----
 src/components/personListing.component.jsx | 2 +-
 src/data/personsData.js                    | 5 +++++
 3 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/components/person.component.jsx b/src/components/person.component.jsx
index 079ef8f..2c04880 100644
--- a/src/components/person.component.jsx
+++ b/src/components/person.component.jsx
@@ -1,11 +1,7 @@
 import { useState, useEffect } from 'react';
 
-// import stysheet defining style specific to this component
 import '../assets/style/person.css';
 
-/*
-* define a component that uses props, props is a javascript object
-*/
 const Person = ( { name = 'Anonymous', age, started, delay } ) => {
    
    const [ currentAge, setCurrentAge ] = useState(age);
diff --git a/src/components/personListing.component.jsx b/src/components/personListing.component.jsx
index 09738a4..3c238c0 100644
--- a/src/components/personListing.component.jsx
+++ b/src/components/personListing.component.jsx
@@ -13,7 +13,7 @@ const PersonListing =  props  => {
    const [persons, setPersons ] = useState([]);
 
    const fetchData = async () => {
-      const data = await mockFetch('http://source.of.data/persons',1000);
+      const data = await mockFetch('http://source.of.data/persons',10);
       setPersons( data );
    }      
 
diff --git a/src/data/personsData.js b/src/data/personsData.js
index 9ba76f5..82832b3 100644
--- a/src/data/personsData.js
+++ b/src/data/personsData.js
@@ -8,6 +8,11 @@ const persons = [
       id: 'A002',
       name: "Bilbo Baggins",
       age: 111
+   },
+   {
+      id: 'A003',
+      name: "Frodo Baggins",
+      age: 33
    }
 ];
 
-- 
GitLab