Skip to content

Commit

Permalink
Calendar update with daily
Browse files Browse the repository at this point in the history
  • Loading branch information
juaneortiz1 committed May 8, 2024
1 parent 9804da2 commit ba919f2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.

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

6 changes: 3 additions & 3 deletions .idea/workspace.xml

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

7 changes: 4 additions & 3 deletions src/components/secondary/Daily.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,16 @@ const Daily = ({ day, handleSubmmit }) => {
useEffect(() => {
const fetchOutfitsForDay = async () => {
try {
const response = await axios.get(`${apiUrl}user/clothings/aed01e26-1d1b-479e-a2aa-c8acc92f03c0`);
const formattedDate = day.toLocaleDateString('en-US', { year: 'numeric', month: '2-digit', day: '2-digit' });
const response = await axios.get(`${apiUrl}user/day/aed01e26-1d1b-479e-a2aa-c8acc92f03c0/${formattedDate}`);
setOutfits(response.data.outfits);
} catch (error) {
console.error('Error fetching outfits for the day:', error);
}
};

fetchOutfitsForDay();
}, [apiUrl]);
}, [apiUrl, day]);


const handleSelectOutfit = (index) => {
Expand Down

0 comments on commit ba919f2

Please sign in to comment.