kevinyee1993 / genius

4 stars 0 forks source link

Only users who created a track can edit it #20

Closed kevinyee1993 closed 6 years ago

kevinyee1993 commented 6 years ago

Need to take out the buttons for edit lyrics and info if the user is not correct. May also need to update the protected/auth routes

kevinyee1993 commented 6 years ago

Users who did not create the post can still go to the forms but when they try to save anything, nothing happens.

kevinyee1993 commented 6 years ago

Got edit buttons to only show up when the correct user is logged in. Did this by passing the currentUser as props and comparing that id with the id of the track's author id. If they matched, then the buttons would be displayed