diff --git a/src/components/profile/Profile.js b/src/components/profile/Profile.js index ae9ad43..e456295 100644 --- a/src/components/profile/Profile.js +++ b/src/components/profile/Profile.js @@ -1,27 +1,62 @@ -import react from "react"; +import { React } from "react" import { useState, useEffect } from "react"; export const Profile = () => { const [Users, fetchUsers] = useState([]) const [currentuser, setcurrentuser] = useState(localStorage.getItem("graphicsbaytracker_customer")) - const [currentUsertrackedcards, setcurrentUsertrackedcards] = useState([])) + const [currentUsertrackedcards, setcurrentUsertrackedcards] = useState([]) useEffect( () => { fetch("http://localhost:8088/trackedCards?_expand=cardDataId") .then(res => res.json()) .then(setcurrentUsertrackedcards) - },[]) + }, []) useEffect( () => { fetch("http://localhost:8088/users") .then(res => res.json()) .then(fetchUsers) - },[]) + }, []) return( <> - {/* why is this returning duplicate elements?*/} + {/* why is my code returning duplicate elements?*/}
returning something. This is a test
+| Brand | +Model | +Price | +
|---|