Live link: https://mic-lockr.herokuapp.com/
- Sign-in/Log-in with your own creditionals or via our Demo User
- Create, Read, Update, and Destroy Images with Error Handling
- Create, Read, and Destroy Comments with Error Handling
- I would love to add AWS integration
- I want to create personal Lockrs to allow users to keep track of mics that only they have added.
I had an ongoing issue where viewing a single mic would return a blank screen upon refresh. This was because my return statement had been relying on my Redux store that was not hydrating fast enough. I was able to fix the issue using a short circuit (&& &&) before my return, giving enough time for the store to be there.
return personLoggedIn && currentlyViewingThisMic && (
<div className='mostOuterDiv'>
<div className='singleMicDiv'>
<img className='micImage' src={currentlyViewingThisMic.imageURL} alt={currentlyViewingThisMic.title} onClick={() => history.push('/')}></img>
<h1 className='singleMicTitle'>{currentlyViewingThisMic.title}</h1>
<h2 className='singleMicDescription'>{currentlyViewingThisMic.description}</h2>
</div>
<div>
{editButton}{deleteButton}
</div>
<Comments />
{commentButton}
{showCommentForm && (
<AddComment />
)}
</div>
)
}