nss-evening-cohort-10 / nutshell-nautilus-explorer

0 stars 0 forks source link

refactor auth data #75

Closed denzelb5 closed 4 years ago

denzelb5 commented 4 years ago

User story:

N/A

AC:

WHEN: on page load, THEN: only the home page should be displayed, all other pages should only display after clicking on the appropriate link. If the user is logged in, the user should be able to add, delete, and edit each page.

Dev Notes:

Refactor calling of functions. Move function calls to authData.js to determine if user is logged in or not. If user is logged in, they should be able to perform full CRUD on each page.
Fix event listeners. Move event listeners to an eventListeners.js file, with the exception of the login/ logout button, which will remain in authData. There should also be a window.onload function to coordinate the hiding and showing of the appropriate pages.