ScorpionFiko / chad-gpt

MIT License
0 stars 2 forks source link

Persist login #97

Closed ScorpionFiko closed 1 year ago

ScorpionFiko commented 1 year ago

completed persist login functionlity that allows the user to stay logged in (i.e. go to dashboard directly) while the Auth token is still active. Changes made to:

  1. Login/signup - to store user info in the indexedDB
  2. build workout - to store updated info in the indexedDB
  3. main landing - to check whether the user is still logged in; if yes, retrieve info from indexedDB and update redux store
  4. auth - login function to include the window.assign('/')
  5. workoutdetails - to implement more direct access approach to the workout routine
  6. Nav - to ensure logout deletes info from indexedDB;

other bug fixes:

  1. server JS - throw error when open AI does not come with data
  2. build workout - insert the 'const response = await getOpenAIResponse(fitnessInfo);' in the try-catch block