diff --git a/src/App.css b/src/App.css
index 2e479417..534d1551 100644
--- a/src/App.css
+++ b/src/App.css
@@ -2,15 +2,12 @@ body {
margin: 0;
}
-* {
- box-sizing: border-box;
+h2 {
+ text-align:center;
}
-ul[class] {
- list-style: none;
-
- margin: 0;
- padding: 0;
+* {
+ box-sizing: border-box;
}
.main-layout {
diff --git a/src/sections/Advice/components/AdviceSlip.jsx b/src/sections/Advice/components/AdviceSlip.jsx
index e69de29b..0d69cb47 100644
--- a/src/sections/Advice/components/AdviceSlip.jsx
+++ b/src/sections/Advice/components/AdviceSlip.jsx
@@ -0,0 +1,15 @@
+
+
+function AdviceSlip({ advice, onClick, onFavourite }) {
+
+ return (
+ <>
+
Some advice
+ {advice}
+
+
+ >
+ )
+}
+
+export default AdviceSlip
\ No newline at end of file
diff --git a/src/sections/Advice/components/FavouriteSlipsList.jsx b/src/sections/Advice/components/FavouriteSlipsList.jsx
index e69de29b..6ec0762a 100644
--- a/src/sections/Advice/components/FavouriteSlipsList.jsx
+++ b/src/sections/Advice/components/FavouriteSlipsList.jsx
@@ -0,0 +1,18 @@
+
+function FavouriteSlipsList({ favourites }) {
+
+ return (
+ <>
+ Favourite advice slips
+
+ {favourites.map((fav, index) => (
+ -
+ {fav}
+
+ ))}
+
+ >
+ )
+}
+
+export default FavouriteSlipsList
\ No newline at end of file
diff --git a/src/sections/Advice/index.jsx b/src/sections/Advice/index.jsx
index 0405f11f..cbafa1b9 100644
--- a/src/sections/Advice/index.jsx
+++ b/src/sections/Advice/index.jsx
@@ -1,9 +1,44 @@
+
+import { useState, useEffect } from 'react'
+import FavouriteSlipsList from './components/FavouriteSlipsList'
+import AdviceSlip from './components/AdviceSlip'
+
function AdviceSection() {
+
+ const url = "https://api.adviceslip.com/advice"
+
+ const [data, setData] = useState([])
+ const [isClicked, setIsClicked] = useState(false)
+ const [favourites, setFavourites] = useState([])
+
+ const onClick = () => {
+ setIsClicked(!isClicked)
+ }
+
+ const onFavourite = (e) => {
+ if (!(favourites.includes(e.target.value))){
+ setFavourites([...favourites, e.target.value])
+ }
+ }
+
+ useEffect(() => {
+ const fetchData = async () => {
+ const response = await fetch(url)
+ const jsonData = await response.json()
+ setData(jsonData)
+ }
+ fetchData()
+ }, [isClicked])
+
return (
)
}
diff --git a/src/sections/Art/components/Art.css b/src/sections/Art/components/Art.css
new file mode 100644
index 00000000..9e1332e0
--- /dev/null
+++ b/src/sections/Art/components/Art.css
@@ -0,0 +1,16 @@
+
+ul {
+ padding:5px;
+}
+
+.art_item {
+ padding-bottom:30px;
+}
+
+.history_list_item {
+ padding-bottom:8px;
+ padding-left:10px;
+}
+
+
+
diff --git a/src/sections/Art/components/ArtList.jsx b/src/sections/Art/components/ArtList.jsx
index e69de29b..f9c435ac 100644
--- a/src/sections/Art/components/ArtList.jsx
+++ b/src/sections/Art/components/ArtList.jsx
@@ -0,0 +1,20 @@
+
+/* eslint-disable react/prop-types */
+import './Art.css'
+
+import ArtListItem from "./ArtListItem";
+
+function ArtList({ data, imageURLBase }) {
+
+ return (
+ <>
+
+ {data.map((art, index) => (
+
+ ))}
+
+ >
+ );
+}
+
+export default ArtList
\ No newline at end of file
diff --git a/src/sections/Art/components/ArtListItem.jsx b/src/sections/Art/components/ArtListItem.jsx
index e69de29b..87c7ae28 100644
--- a/src/sections/Art/components/ArtListItem.jsx
+++ b/src/sections/Art/components/ArtListItem.jsx
@@ -0,0 +1,22 @@
+import PublicationHistoryList from "./PublicationHistoryList"
+import './Art.css'
+
+function ArtListItem({ image, title, name, publications }) {
+
+ return (
+ <>
+
+
+ {title}
+ Artist: {name}
+
+
+ >
+ )
+}
+
+export default ArtListItem
diff --git a/src/sections/Art/components/PublicationHistoryList.jsx b/src/sections/Art/components/PublicationHistoryList.jsx
index d3f5a12f..8e0b7f2d 100644
--- a/src/sections/Art/components/PublicationHistoryList.jsx
+++ b/src/sections/Art/components/PublicationHistoryList.jsx
@@ -1 +1,18 @@
+import './Art.css'
+
+function PublicationHistoryList({ history }) {
+
+ return (
+ <>
+ Publication History
+
+ {history.map((it, index) => (
+ - ♦ {it}
+ ))}
+
+ >
+ )
+}
+
+export default PublicationHistoryList
diff --git a/src/sections/Art/index.jsx b/src/sections/Art/index.jsx
index 0c74ffc2..cf7adbd2 100644
--- a/src/sections/Art/index.jsx
+++ b/src/sections/Art/index.jsx
@@ -1,8 +1,29 @@
+
+import { useState, useEffect } from 'react'
+import ArtList from './components/ArtList';
+
function ArtsSection() {
+
+ const url = "https://boolean-uk-api-server.fly.dev/art"
+ const imageURLBase = "https://boolean-uk-api-server.fly.dev"
+
+ const [data, setData] = useState([])
+
+ useEffect(() => {
+ const fetchData = async () => {
+ const response = await fetch(url);
+ const jsonData = await response.json();
+ setData(jsonData)
+ };
+ fetchData();
+ }, [])
+
return (
)
}
diff --git a/src/sections/Users/components/UsersList.jsx b/src/sections/Users/components/UsersList.jsx
index e69de29b..0ee85def 100644
--- a/src/sections/Users/components/UsersList.jsx
+++ b/src/sections/Users/components/UsersList.jsx
@@ -0,0 +1,22 @@
+import UsersListItem from "./UsersListItem"
+
+function UsersList({ data }) {
+
+ return (
+ <>
+
+ {data.map((user, index) => (
+
+ ))}
+
+ >
+ )
+}
+
+export default UsersList
diff --git a/src/sections/Users/components/UsersListItem.jsx b/src/sections/Users/components/UsersListItem.jsx
index e69de29b..bdb378d6 100644
--- a/src/sections/Users/components/UsersListItem.jsx
+++ b/src/sections/Users/components/UsersListItem.jsx
@@ -0,0 +1,18 @@
+
+function UsersListItem({ img, name, email, color }) {
+
+ return (
+ <>
+
+
+ {name}
+ Email: {email}
+
+ >
+ )
+}
+
+export default UsersListItem
diff --git a/src/sections/Users/index.jsx b/src/sections/Users/index.jsx
index 77332830..f35c4c0a 100644
--- a/src/sections/Users/index.jsx
+++ b/src/sections/Users/index.jsx
@@ -1,8 +1,28 @@
+
+import { useState, useEffect } from 'react'
+import UsersList from './components/UsersList'
+
function UsersSection() {
+
+ const url = "https://boolean-uk-api-server.fly.dev/magnusgit1/contact"
+
+ const [data, setData] = useState([])
+
+ useEffect(() => {
+ const fetchData = async () => {
+ const response = await fetch(url)
+ const jsonData = await response.json()
+ setData(jsonData)
+ }
+ fetchData()
+ }, [])
+
return (
)
}