BarneyShi / Team1-VanHouse

CPSC455 course project.
0 stars 1 forks source link

Update <PostDetail /> component #25

Closed BarneyShi closed 3 years ago

BarneyShi commented 3 years ago

Finished parts:

  1. Edit post
  2. Comment function,
  3. Delete post
  4. Report function
  5. Use a scraper to convert postal code to coordinates

Todos:

  1. Need to know current user to finish some details.
  2. Need to find a way to edit post images, like removing old ones or adding new ones.
  3. Might implement deleting comments function if there is time left.
NaithanB commented 3 years ago

@BarneyShi, This is awesome! Looks really nice. Great idea to include a "view more" button. It's pretty cool having a working map too.

Just a couple possible changes. When you click the view more button, in the modal view that opens, Lease length appears twice.

Adding those extra loading spinners looks better. I think we should remove the one on the comment box though. It looks a bit like an error to me. Or maybe we could hide the comment box until the page loads?

The delete button isn't doing anything on my end.

Did anyone take implementing the rating buttons?

NaithanB commented 3 years ago

P.S. happy to merge this now. Those changes are really minor.

NaithanB commented 3 years ago

Oh, I also noticed, in PostDetail, there was a useEffect I added to get the current post. I added a state to display the schedule that we get from the database rather than the fixed schedule. I think that got removed. Was that intentional? There was also an alert that displayed error messages if the we received bad info, but now if there's a connection problem we get stuck with the loading spinner and the alert is gone.

BarneyShi commented 3 years ago

Oh, I also noticed, in PostDetail, there was a useEffect I added to get the current post. I added a state to display the schedule that we get from the database rather than the fixed schedule. I think that got removed. Was that intentional? There was also an alert that displayed error messages if the we received bad info, but now if there's a connection problem we get stuck with the loading spinner and the alert is gone.

@NaithanB I guess I might have accidentally removed them when dealing with conflicts. I will add them back. For rating, I finished backend part but I didn't work on the front-end part because we don't know who the current user is. For deleting, I want to allow only post owners to delete their post, so I'm holding on this part until we have logged-in user info. I will make changes based on your comments. Thanks!

NaithanB commented 3 years ago

Yeah, that's easy to do. Sounds good. That makes sense about the rating part. Should have looked in the code first.