You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tried this and got confused too. Not sure you understand the issue or maybe I didn't explain well. I'll like to further discuss this to have a solution.
Basically, all I'm saying is how to be able to use the code that checks if a session exists for each component and put it inside router.js so it can be used with a beforeRoute method so we don't have to keep writing the same code for every component.
I hope this is clear this time around? 🙂 Also, if there is any way I can contribute, I'm not good at it but willing to learn
In the documentation, to check if a session exists on a component, we need to do:
This will check if a session exists, else redirect back to homepage.
I have many components, and doing this on each of them feels like WET code, so I decided to do it on the
router.js
fileIt isn't working and I'm getting an error:
[vue-router] uncaught error during route navigation:
Invalid Object
with a dropdown of many filesThe text was updated successfully, but these errors were encountered: