课程: React: Creating and Hosting a Full-Stack Site

免费学习该课程!

今天就开通帐号,24,700 门业界名师课程任您挑!

Making interface adjustments for authenticated users

Making interface adjustments for authenticated users - React.js教程

课程: React: Creating and Hosting a Full-Stack Site

Making interface adjustments for authenticated users

- [Instructor] All right, so at this point we have the pages that will allow the user to either log in or create an account, but so far, not a whole lot happens in the interface besides navigating the user to the articles list page. So what we're going to want to do here is, A, add some sort of link that allows the user to log in to our nav bar up here next to the other links that we have, and, B, if the user's already logged in, we're going to want to have a log out button that will actually sign the user out. And maybe we'll want to do something like display the user's email address as well just so that we can prove that we actually have a logged in user here visually. So here's what this is going to look like. We're going to go back over to our IDE and let's open up the nav bar here real quick. We're just going to find that here, NavBar.jsx. And now next to our articles link, we're going to add another list item here with a button inside it that says Sign In, or Log In, or you can…

内容