Skip to content

Commit

Permalink
Calendar completely implemented
Browse files Browse the repository at this point in the history
  • Loading branch information
juaneortiz1 committed May 8, 2024
1 parent fea64bf commit 3a7b3af
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
10 changes: 8 additions & 2 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions src/components/secondary/Daily.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand All @@ -21,7 +24,6 @@ const Daily = ({ day, handleSubmmit }) => {
fetchOutfitsForDay();
}, [apiUrl, day]);


const handleSelectOutfit = (index) => {
setSelectedOutfitIndex(index);
};
Expand All @@ -45,3 +47,4 @@ const Daily = ({ day, handleSubmmit }) => {
};

export default Daily;

0 comments on commit 3a7b3af

Please sign in to comment.