-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: force user to login only on account dependent page #1045
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tAck
[() => web3.value.account, () => web3.value.authLoading], | ||
([account, authLoading]) => { | ||
if (!account && !authLoading) { | ||
modalAccountWithoutDismissOpen.value = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe better to redirect to home/explore page?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My reasoning is as follow:
user who wants these page have a direct link (bookmarks, etc…), and want their content. If not logged in, they would want to login, else it would not make sense to access these pages.
/home is different, as there’s a link from the landing page, and anyone can go there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bonustrack wdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's merge this for now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sense, I'll merge this
Summary
Closes: https://github.com/snapshot-labs/workflow/issues/325
This PR will force prompt users to login only page depending on the current wallet (except /home).
Also fix a minor issue where logging out while on the /notifications page was not clearing the existing notifications
How to test