-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat: put toggle + disclaimer #237
Conversation
@@ -105,11 +109,15 @@ State.init({ | |||
indexer_resPage: 0, | |||
logsPage: 0, | |||
statePage: 0, | |||
v2Toggle: false, |
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.
Could we pull the v2Toggle from storage to retain the user's previous selection, and default to false if none? If someone has to refresh their page to view logs for example, and it switches to off each time, that could be frustrating.
Also, does the v2Toggle remain when switching indexers or is it switched back to off when you switch indexers?
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.
Good point. I tried to implement it but it was a little finicky.
Gonna leave this for another time. I do not think it is worth the extra effort for now. Later we will transition everyone to v2 anyways.
className="shadow-none" | ||
id={`toggle-${key}`} | ||
onCheckedChange={disabled ? null : onSwitch} | ||
title={disabled ? `Permanently ${active ? "enabled" : "disabled"}` : null} |
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.
What does this line do? What is supposed to be "permanently enabled/disabled"?
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.
Not quite sure actually. I copied this component from devgogs.near
Adds a toggle to update which graphql endpoint the logs and state are pulled from.