From 696b941809e2159107f4e1879bda5bc245b2a69b Mon Sep 17 00:00:00 2001 From: Roderick Leito Date: Fri, 12 Sep 2025 15:59:15 +0200 Subject: [PATCH] Finished Core --- src/sections/Art/index.jsx | 36 +++++++++++++++++++++++++++++++++++- src/sections/Users/index.jsx | 26 +++++++++++++++++++++++++- 2 files changed, 60 insertions(+), 2 deletions(-) diff --git a/src/sections/Art/index.jsx b/src/sections/Art/index.jsx index 0c74ffc2..934e142d 100644 --- a/src/sections/Art/index.jsx +++ b/src/sections/Art/index.jsx @@ -1,8 +1,42 @@ +import { useEffect, useState } from "react" + function ArtsSection() { + const [arts, setArts] = useState([]); + const url = "https://boolean-uk-api-server.fly.dev/art"; + const baseUrl = "https://boolean-uk-api-server.fly.dev"; + + useEffect(() => { + fetch(url) + .then(res => res.json()) + .then(setArts) + }, []); + return (

Arts Section

-
+
+
    + {arts.map(art => +
  • +
    + {art.title} + +
    +

    {art.title}

    +

    Artist: {art.artist}

    +

    Publication History:

    +
      + {art.publicationHistory.map((publication, index) => +
    • + {publication} +
    • + ) + } +
    +
  • + )} +
+
) } diff --git a/src/sections/Users/index.jsx b/src/sections/Users/index.jsx index 77332830..b579dcca 100644 --- a/src/sections/Users/index.jsx +++ b/src/sections/Users/index.jsx @@ -1,8 +1,32 @@ +import { useState, useEffect } from "react" + function UsersSection() { + const [users, setUsers] = useState([]); + const url = "https://boolean-uk-api-server.fly.dev/RoderickLei/contact"; + + useEffect(() => { + fetch(url) + .then(res => res.json()) + .then(setUsers) + }, []); + return (

Users Section

-
+
+
    + {users.map(user => +
  • + {`${user.firstName} +

    {user.firstName} {user.lastName}

    +

    {user.email}

    +
  • + )} +
+
) }