Skip to content

Commit

Permalink
Remove styling change to allow for sessionStorage to run properly.
Browse files Browse the repository at this point in the history
  • Loading branch information
corysanders3 committed Feb 26, 2024
1 parent 5645939 commit 9435a80
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/domUpdates.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ const formError = document.querySelector('.form-error');
const hydrationIcon = document.querySelector('#hydrationIcon');
const draggables = document.querySelectorAll('.draggable');
const containers = document.querySelectorAll('.container');
let user, hydration, sleep, today, flOzDays, userSleepInfo, sleepDay;
const submitButton = document.querySelector('.formBtn')
const formError = document.querySelector('.form-error')
const hydrationIcon = document.querySelector('#hydrationIcon')
// let user, hydration, sleep, today, flOzDays, userSleepInfo, sleepDay;
// const submitButton = document.querySelector('.formBtn')
// const formError = document.querySelector('.form-error')
// const hydrationIcon = document.querySelector('#hydrationIcon')
let user, hydration, sleep, today, flOzDays, userSleepInfo;
let createdWaterMeter = new CircularFluidMeter(waterMeter, {
borderWidth: 15,
Expand Down Expand Up @@ -152,7 +152,8 @@ function userGrabber(usersData) {
let index
if(sessionStorage.getItem("user")){
index = parseInt(sessionStorage.getItem("user"));
}else{
console.log('index', index)
} else {
index = getUserIndex(usersData);
}
let currentUser = getUserData(index, usersData.users);
Expand Down Expand Up @@ -258,12 +259,10 @@ function updateButtonsDate(dates) {

function openForm() {
popUpForm.style.display = 'block';
hydrationIcon.style.filter = 'blur(6px)'
}

function closeForm() {
popUpForm.style.display = 'none'
hydrationIcon.style.filter = 'none'
sessionStorage.setItem("user", user.id);
}

Expand Down

0 comments on commit 9435a80

Please sign in to comment.