How to disable all components on page, when cookies is false?? | Sololearn: Learn to code for FREE!

+2

How to disable all components on page, when cookies is false??

When I login to website, and open same in another tab. Close one session, still in another session I am able to access all components. What can be done for this? Is it possible to disable q-page-container ?

4/6/2021 4:05:55 PM

sadiya zainab

1 Answer

New Answer

+1

Set a life cycle hook to validate cookie. If the cookie is invalid clear out the session/local storage. use beforeMount/ beforeCreate hooks.