SHIV5T3R / CO-DE

An Open Source Collaborative Code Editor
34 stars 26 forks source link

Refactoring in AuthGate component #62

Closed hobi9 closed 10 months ago

hobi9 commented 11 months ago

login and signup components are not accessible anymore if the user has signed in.

zatoa commented 11 months ago

This PR confuses me, why not just import the user hook into the router file and conditionally show the sign up buttons?

believemanasseh commented 11 months ago

This PR confuses me, why not just import the user hook into the router file and conditionally show the sign up buttons?

I believe the AuthGate parent component is needed for the necessary validation checks before rendering the actual component. I don't think there's a more cleaner way tbh.