Closed JakeCapra closed 4 years ago
actually well done, but do we want to move the user info into possibly a client.js? e.g. something like the Spotify client and the user client I currently have in a merge request #52 . I'm asking because while I understand the code it might be worthwhile to move some stuff around but you know the code better than me.
I would not know how to do it. I am treating navbar.js as the "home" for the user data, so that every page has access to the users info. What we could do is pass the user object to client.js.
Implemented the Google Sign-In API. This pr resolves issue #38. Currently, I have it set up to record a user's Full Name, First Name, Last Name, Email, Google ID, and Profile Pic (URL) (these are all variables, see navbar.js for the full object).
Things to note about this change:
npm install react-google-login
(info also in the readme)<p><Link to="/">Home</Link></p>
now a link will look something like this:<Link to={{pathname:"/", state: {user}}}>Home</Link>
.user
is the object that has all the user info these are link from navbar.jsAccessing the user object from a page:
this.props.location.state.user.VARIABLE
(also see profile.js).this.props.location.state.user.points += x
Currently, there is no way to sign out of an account. I could implement it later if we think it's necessary. Make sure you look at the updated readme if something is not working for you!!