next-firebase-course
next-firebase-course copied to clipboard
Logging out while on a Post page causes an error in HeartButton component
The following error occurs when clicking Log Out on a post page ([username]/[slug]).
It seems that the AuthCheck fails and the HeartButton component is mounted. This shouldn't happen since the HeartButton code requires a logged in user. How can we ensure the AuthCheck works correctly to prevent this?