Closed frankcollins3 closed 1 year ago
👍 useEffect(() => { (async() => { let currentUser = await currentuserJSONparse() let currentuserID = currentUser.id
let currentUserDataArray = await getAllUserData(currentuserID)
let dataLength = currentUserDataArray.length
console.log('currentUserDataArray')
console.log(currentUserDataArray)
if (currentUserDataArray) {
setHydroData(currentUserDataArray);
const getDates = currentUserDataArray.map((day, index) => {
const formattedDate = moment(day.date, 'YYYY-M-D').format('MM-DD-YYYY');
return formattedDate;
});
// ...
} else {
return;
}
})()
}, []);
👍 https://momentjs.com/docs/ 👍 👍 👍 https://chat.openai.com/
app was supposed to be done weeks ago had to do it
[2:31am]
attempting to do: nothing. make old working code new working code. map over psql.table.data correspondent to currentUser by users_id and format dates so the calendar is ready to handle data
error:![Screen Shot 2023-06-20 at 2 22 31 AM](https://github.com/frankcollins3/fill_container/assets/73137934/bfce7cd1-7d7d-4f38-80d7-c135bf64b230)
proposed approach: possibly look into another library or look into current library documentation / ask chatGPT for clues
[2:27am]