From 3a7b3af8472c0817aa2b9bc625a854d990e4e5b0 Mon Sep 17 00:00:00 2001 From: Juanes Date: Wed, 8 May 2024 14:25:22 -0500 Subject: [PATCH] Calendar completely implemented --- .idea/workspace.xml | 10 ++++++++-- src/components/secondary/Daily.js | 7 +++++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 098f758..64832cf 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -6,7 +6,6 @@ - diff --git a/src/components/secondary/Daily.js b/src/components/secondary/Daily.js index 2dab162..69599ee 100644 --- a/src/components/secondary/Daily.js +++ b/src/components/secondary/Daily.js @@ -11,8 +11,11 @@ const Daily = ({ day, handleSubmmit }) => { const fetchOutfitsForDay = async () => { try { const formattedDate = day.toISOString().split('T')[0]; + const url = `${apiUrl}day/aed01e26-1d1b-479e-a2aa-c8acc92f03c0/${formattedDate}`; + console.log("URL:", url); const response = await axios.get(`${apiUrl}day/aed01e26-1d1b-479e-a2aa-c8acc92f03c0/${formattedDate}`); - setOutfits(response.data.outfits); + console.log("Response:", response); + setOutfits(response.data); } catch (error) { console.error('Error fetching outfits for the day:', error); } @@ -21,7 +24,6 @@ const Daily = ({ day, handleSubmmit }) => { fetchOutfitsForDay(); }, [apiUrl, day]); - const handleSelectOutfit = (index) => { setSelectedOutfitIndex(index); }; @@ -45,3 +47,4 @@ const Daily = ({ day, handleSubmmit }) => { }; export default Daily; +