I added a logout button to my website. But for some reason, it is not working. Here is my code:
The error says “Property ‘then’ does not exist on type 'void.”
I added a logout button to my website. But for some reason, it is not working. Here is my code:
The error says “Property ‘then’ does not exist on type 'void.”
Just what it means - logout function doesn’t return a status.
You don’t have to close the lightbox after logging out.
The page will refresh anyway.
Ok. I’ll try deleting the code to close the lightbox.
But the problem with that is I don’t want the user to be able to edit their profile if they are logged out.
@jonatandor35 Oh ok… good idea! I will try that and let you know if it works!
But… That actually won’t work because what if the user opens the edit profile page when they ARE logged in and then they click on the logout button… they will still be in the logout page…
The logout button doesn’t appear in the lightbox unless you put it there.
Even if you add a Logout button to the lightbox once the user clicks Logout, the page will get refreshed and the lightbox will be closed.
P.S. If you’re not referring to a lighbox but to a webpage, all you need to do is to set the permissions to Members Only
@jonatandor35 Ok. I’ll try that…