Optimizing Metadata for User Info
00:00 All right, so Kelly, the coworker, did a little bit of nice work for us. And that is she added a little bit of metadata to our notes index page, as well as our notes specific note ID page. On the notes index page, the best that she could do
00:17 was add the username from the params, because that note index page doesn't even have a loader. So there's no way to get that data to know which user it is. We'd have to create a loader for that, which seems kind of wasteful, because we actually already have the user's name available somewhere. So it would be cool if we could just somehow get
00:36 that information. So that is part of what you're going to be doing. Also, she has defaulted it to just be zero notes in the anticipation that you are going to calculate the number of notes based on the data that we have on the page already. So you're going to be doing that. And then also on the note ID page,
00:53 she's added the username here, as well. And she's also added the contents of the note, the first 100 characters with the dot, dot, dot. And so that has already been done for you. But you need to enhance this so that we're getting the actual user's name, rather than just their username.
01:10 So on both of those routes, you need to access some parent route data. So because the index route doesn't have a loader, but its parent does have a loader that has the data that we need. So you need to access that. And same thing on the note ID route, as well, to get the owner of the note to get their name,
01:29 you're going to access the parent route data. So go ahead and do that. This one's a little bit more involved than the other ones. But the emoji are there to guide you. And I think that you will have a good time with it. So I'll see you when you're done.