sid-s1 / Travel-App

Tript
https://ga-tript.herokuapp.com/
1 stars 0 forks source link

Chris/login logout #7 #36

Closed Chrispy1987 closed 2 years ago

Chrispy1987 commented 2 years ago

Hey team,

Login/Logout functionality should now be working. We'll need Daves signup function working first, so that the database has hashed passwords stored.

I found it tedious repeating myself over and over, creating div elements, so instead I've created a function in the 'layout.js' file. It will take two paramaters - the first must be an array of all elements you wish to wrap (in order), and the second is if you'd like that parent div to have a className assigned to it (optional).

Usage Example: const wrapped = layout.wrap([iconPassword, inputPassword], 'login-frame');

Hit me up if you have any questions or can see a way to improve this process? Feel free to use it if it suits you're requirements.

Note: the current 'user' seed won't work (unless the correct hashed version is seeded)

Cheers, Chris