Added a global context that is wrapped in the root layout of the app.
Once a user is logged in, the root layout is rerendered and it will update the properties inside the context so that it is changed throughout the application.
Removed all places that used useAuth or useUser to get the user_id, token, etc.
Removed the ml model ðŸ˜
Removed a bunch of unused imports in our app.
Portions of this code that utilized AI generation
None
Screenshots (optional)
None
How to Test
Clone the repo, and in the app/_layout.tsx, destruct {token, user, user_id} from theuseContext (line 91).
Put a console.log in the index.tsx and login.tsx with the destructured items inside there and see that when logged in, it should have the items and when logged out, they should be cleared.
Checklist
[x] I have added/updated relevant documentation, and I have followed the coding style guidelines.
[ ] I have added/updated tests, and I have run the test suite and all tests pass.
[x] I have checked for any potential conflicts with other branches and fixed any merge conflicts.
Description / Changes Made
Portions of this code that utilized AI generation
None
Screenshots (optional)
None
How to Test
app/_layout.tsx
, destruct{token, user, user_id}
from theuseContext
(line 91).console.log
in theindex.tsx
andlogin.tsx
with the destructured items inside there and see that when logged in, it should have the items and when logged out, they should be cleared.Checklist