diff --git a/src/components/AboutPage/AboutPage.jsx b/src/components/AboutPage/AboutPage.jsx
index ba94a3d..f10cfec 100644
--- a/src/components/AboutPage/AboutPage.jsx
+++ b/src/components/AboutPage/AboutPage.jsx
@@ -15,6 +15,9 @@ export default function AboutPage() {
const navigate = useNavigate();
const [screenWidth, setScreenWidth] = useState(window.screen.width);
const [data, setData] = useState([]);
+ const [leaderboard, setLeaderboard] = useState([]);
+ console.log("leaderboard", leaderboard);
+ console.log("data", data);
window.onresize = () => {
setScreenWidth(window.screen.width);
@@ -27,9 +30,14 @@ export default function AboutPage() {
useEffect(() => {
const getData = async () => {
axios
- .get("http://localhost:3001/items")
+ .get(`${process.env.REACT_APP_AWS_BACKEND_URL}/items/`)
.then((data) => setData(data.data))
.catch((err) => console.log(err));
+
+ axios
+ .get(`${process.env.REACT_APP_AWS_BACKEND_URL}/leaderboard/`)
+ .then((leaderboardData) => setLeaderboard(leaderboardData.data))
+ .catch((err) => console.log(err));
};
getData();
}, []);
@@ -97,7 +105,7 @@ export default function AboutPage() {
- 0
+ {data.filter((item) => item.isresolved).length}
Successful Returns
@@ -105,7 +113,7 @@ export default function AboutPage() {
- {data.length}
+ {leaderboard.length}
Active Users