diff --git a/src/App.jsx b/src/App.jsx
index 5ef8293f..6944c8a8 100644
--- a/src/App.jsx
+++ b/src/App.jsx
@@ -7,7 +7,7 @@ function App() {
return (
)
diff --git a/src/sections/Advice/index.jsx b/src/sections/Advice/index.jsx
index 0405f11f..4c89edd8 100644
--- a/src/sections/Advice/index.jsx
+++ b/src/sections/Advice/index.jsx
@@ -1,9 +1,84 @@
+import { useEffect, useState } from "react"
+
+
function AdviceSection() {
+
+
+ const [data, setData] = useState({"slip": { "id": 0, "advice": "Dummy"}});
+ const [fav, setFav] = useState(["Dummy", "strings"]);
+
+
+ useEffect(() =>{
+ fetch('https://api.adviceslip.com/advice')
+ .then(response => {
+ return response.json();
+ })
+ .then (jsonData =>{
+ setData(jsonData);
+ console.log(data);
+
+
+ })
+ .catch(error => {
+ console.log("EERRORORR");
+ console.log(error);
+ })
+
+
+ }, []);
+
+ const update = () =>{
+
+ fetch('https://api.adviceslip.com/advice')
+ .then(response => {
+ return response.json();
+ })
+ .then (jsonData =>{
+ setData(jsonData);
+ console.log(data);
+
+
+ })
+ .catch(error => {
+ console.log("EERRORORR");
+ console.log(error);
+ })
+ };
+
+
+
+
+
return (
Advice Section
-
-
+
+ Some Advice
+
+ { {(data.slip.advice) ? data.slip.advice : "loading"}
}
+
+
+
+
+
+
+ Favourite Advice Slips
+
+ {fav.map((item, index) => (
+ <>
+ - {item}
+ >
+ ))}
+ - Measure twice, cut once.
+ - Don't let the bastards grind you down.
+ - Always the burrito.
+
+
)
}
diff --git a/src/sections/Art/index.jsx b/src/sections/Art/index.jsx
index 0c74ffc2..5a1cf5d0 100644
--- a/src/sections/Art/index.jsx
+++ b/src/sections/Art/index.jsx
@@ -1,10 +1,103 @@
+import { useEffect, useState } from "react"
+
function ArtsSection() {
+
+
+ const [data, setData] = useState([]);
+ const [loading,setLoading] = useState(true);
+
+ useEffect(() =>{
+ fetch('https://boolean-uk-api-server.fly.dev/art')
+ .then(response => {
+ return response.json();
+ })
+ .then (jsonData =>{
+ setData(jsonData);
+ setLoading(false);
+/* console.log(data);
+ console.log(loading); */
+
+
+ })
+ .catch(error => {
+ console.log("EERRORORR");
+ console.log(error);
+ })
+
+/* data.map((item, index) => ({
+ url = 'https://boolean-uk-api-server.fly.dev/art' + {item.imageURL}
+ fetch(url)
+ .then(response => {
+
+ setdata( datas => ({
+ ...datas.map(item =>
+ ...item, imageURL:
+ ),
+
+
+ })
+
+
+
+ })
+
+ })
+
+
+
+ */
+ }, []);
+
+
+
+
+
return (
+ <>
Arts Section
-
+
+
+ -
+ {data.map((item) => (
+ <>
+
+

+
+
+ {item.title}
+ Artist: {item.artist}
+ Publication History:
+
+
+ {item.publicationHistory.map((pub) =>(
+ <>
+ - {pub}
+ >
+ ))}
+
+ >
+ ))}
+
+
+
+
+
+ >
)
}
export default ArtsSection
+
+
+/* Paris Street; Rainy Day
+ Artist: Gustave Caillebotte
+ Publication History:
+
+ - Catalogue de la 3e exposition de peinture, exh. cat. (E. Capiomont et V. Renault, 1877), p. 3, cat. 1.
+ - Léon Mancino, “La descente de la courtille,” L’art 9 (Apr. 1877), p. 70.
+ - Anonymous [possibly Gaston Vassy], “La journée à Paris: L’exposition des impressionnalistes,” L’événement, Apr. 6, 1877, p. 2.
+
*/
\ No newline at end of file
diff --git a/src/sections/Users/index.jsx b/src/sections/Users/index.jsx
index 77332830..938a0fa2 100644
--- a/src/sections/Users/index.jsx
+++ b/src/sections/Users/index.jsx
@@ -1,8 +1,55 @@
+import { useEffect, useState } from "react"
+
function UsersSection() {
+
+
+ const [data, setData] = useState([]);
+ const [loading,setLoading] = useState(true);
+
+ useEffect(() =>{
+ fetch('https://boolean-uk-api-server.fly.dev/emazau/contact')
+ .then(response => {
+ return response.json();
+ })
+ .then (jsonData =>{
+ setData(jsonData);
+ setLoading(false);
+
+
+ })
+ .catch(error => {
+ console.log("EERRORORR");
+ console.log(error);
+ })
+
+ }, []);
+
+
+
+
return (
Users Section
-
+
+
+
+
+ {data.map((item) => (
+ <>
+ -
+
+
+ {item.firstName + " " + item.lastName}
+ Email: {item.email}
+
+ >
+ ))}
+
+
+
)
}