TheStanfordDaily/stanforddaily-mobile

Bio and photo on author screen

MatthewTurk247 opened this issue · 1 comments

  1. Open a command-line shell.
  2. Clone the project to your local machine with git clone https://github.com/TheStanfordDaily/stanforddaily-mobile.git -b dev and open the folder with your text editor of choice.
  3. Create a branch off dev called author-bio.
  4. Navigate to screens > Author.js.
  5. Import Model and collect relevant JSON.
  6. Declare a React hook like so: const [authorDetail, setAuthorDetail] = useState({}).
  7. Store JSON result with setAuthorDetail.
  8. Add new component above List. It should be some kind of view with flex-direction: "row".
  9. If an image is available, display it in the component.
  10. If a written bio is available, display it in the component.

Additional reading:

Hi @MatthewTurk247! So sorry for the delay on starting this. I was able to get most of it done, but I have one problem I'm encountering. If there are two authors in an article, when you click the second author, what shows is the first author's bio and photo. I think I might not be understanding the Model data correctly, can you help me? Thanks so much!