diff --git a/src/sections/Advice/index.jsx b/src/sections/Advice/index.jsx index 0405f11f..d2c70c67 100644 --- a/src/sections/Advice/index.jsx +++ b/src/sections/Advice/index.jsx @@ -1,11 +1,10 @@ function AdviceSection() { return ( -
-

Advice Section

+ <>
-
+ ) } -export default AdviceSection +export default AdviceSection; diff --git a/src/sections/Art/components/ArtList.jsx b/src/sections/Art/components/ArtList.jsx index e69de29b..3a33cae3 100644 --- a/src/sections/Art/components/ArtList.jsx +++ b/src/sections/Art/components/ArtList.jsx @@ -0,0 +1,15 @@ +import ArtListItem from "./ArtListItem" + +function ArtList({artList}){ + + return <> + + + +} + +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..7e8b94e2 100644 --- a/src/sections/Art/components/ArtListItem.jsx +++ b/src/sections/Art/components/ArtListItem.jsx @@ -0,0 +1,24 @@ +import PublicationHistoryList from "./PublicationHistoryList"; + +function ArtListItem({artListItem : {imageURL, title, artist, publicationHistory}}){ + + const actualImage = "https://boolean-uk-api-server.fly.dev" + return (<> +
  • +
    + +
    +

    {title}

    +

    {artist}

    +

    Publication History

    + +
  • + ) +} + + +export default ArtListItem; \ No newline at end of file diff --git a/src/sections/Art/components/PublicationHistoryList.jsx b/src/sections/Art/components/PublicationHistoryList.jsx index d3f5a12f..9bd8f2ca 100644 --- a/src/sections/Art/components/PublicationHistoryList.jsx +++ b/src/sections/Art/components/PublicationHistoryList.jsx @@ -1 +1,10 @@ +function PublicationHistoryList({publicationHistory}){ + return( + <> + {publicationHistory.map((publication, i) => + (
  • {publication}
  • ))} + + ) +} +export default PublicationHistoryList; \ No newline at end of file diff --git a/src/sections/Art/index.jsx b/src/sections/Art/index.jsx index 0c74ffc2..84ec3795 100644 --- a/src/sections/Art/index.jsx +++ b/src/sections/Art/index.jsx @@ -1,10 +1,31 @@ +import { useEffect, useState } from "react" +import ArtList from "./components/ArtList" + function ArtsSection() { + const url = "https://boolean-uk-api-server.fly.dev/art" + const [data, setData] = useState([]) + + useEffect(()=>{ + const fetchData = async ()=>{ + const response = await fetch(url); + const jsonData = await response.json(); + setData(jsonData) + + }; + + fetchData(); + },[]) + + console.log(data) + return (

    Arts Section

    -
    +
    + +
    ) } -export default ArtsSection +export default ArtsSection; diff --git a/src/sections/Users/components/UsersList.jsx b/src/sections/Users/components/UsersList.jsx index e69de29b..5bafc318 100644 --- a/src/sections/Users/components/UsersList.jsx +++ b/src/sections/Users/components/UsersList.jsx @@ -0,0 +1,16 @@ +import UsersListItem from "./UsersListItem" + +function UsersList({data}){ + + return( + <> + + + ) +} + +export default UsersList; \ No newline at end of file diff --git a/src/sections/Users/components/UsersListItem.jsx b/src/sections/Users/components/UsersListItem.jsx index e69de29b..a0daf4d9 100644 --- a/src/sections/Users/components/UsersListItem.jsx +++ b/src/sections/Users/components/UsersListItem.jsx @@ -0,0 +1,17 @@ +function UsersListItem({user : {favouriteColour, profileImage, firstName, lastName, email}}){ + + return ( + <> +
  • + {firstName} +

    {`"${firstName} ${lastName}"`}

    +

    {` ${email}"`}

    +
  • + + ) +} + +export default UsersListItem; \ No newline at end of file diff --git a/src/sections/Users/index.jsx b/src/sections/Users/index.jsx index 77332830..3eaa019b 100644 --- a/src/sections/Users/index.jsx +++ b/src/sections/Users/index.jsx @@ -1,10 +1,27 @@ +import { useEffect, useState } from "react" +import UsersList from "./components/UsersList" + function UsersSection() { + const url = "https://boolean-uk-api-server.fly.dev/richard-persson/contact" + const [data, setData] = useState([]) + + useEffect(()=>{ + const fetchData = async ()=>{ + const response = await fetch(url); + const jsonData = await response.json(); + setData(jsonData) + }; + fetchData(); + },[]) + return (

    Users Section

    -
    +
    + +
    ) } -export default UsersSection +export default UsersSection; \ No newline at end of file