BroderickHigby / Influencer-tracking

Find the best influencers online to promote your small business or startup
http://sapie.space
5 stars 0 forks source link

Login+signup v2.3 #17

Closed jeongseock closed 6 years ago

jeongseock commented 6 years ago

Edit 1: Fixed an issue with the Routes.js Raymond found and also other smaller bugs. Also, I'm assuming the search isn't supposed to return anything; if this is not the case than there is another bug. I didn't touch the search part at all though so I'm not too sure whats up with that part.

Edit 2: Forgot to change something so I repulled yet again. Also synced username from cognito with user in app.js.

Now reposting my messages from original pull request:

The Login system is complete. Relevant things done since my last merge to master: -Header.js now contains a dynamic NavBar that changes depending on whether a user is logged in or not. (If a user is logged in they see the button Logout and if not they see the buttons Login and Signup.) It's currently pretty ugly. The links do work, and when a user is logged in, one of the Navbar messages will change from "Welcome!" to 'Signed in as: {username}', with the username being a link to a currently nonexistent app/profile page. -Login state is now contained within the state of the main js file: App.js. When a user logs in, Login.js calls functions in App.js that changes the state in App.js. Similarly, when a user presses the Logout button in the Navbar (in Header.js), functions passed through as props into Header.js are called to change the state of App.js. -AWS Cognito SDK handles Local Storage and Cookies for us. Functionality wise, now the browser handles whether a logged in session exists or not when you refresh the page or switch pages. -Small change, component folder in src now renamed to components.

Possible things to work on:

app/profile page a possible app/payment page (Stripe) site is ugly in general, so making it look nicer Making it impossible to go to app/Login if already logged in. Side Note: #4 brings up something that needs to be done for the future anyways; making certain routes inaccessible for unauthorized/unsubscribed users.