-
Notifications
You must be signed in to change notification settings - Fork 64
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
Add "Log back as previous user" feature #193
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.
I feel like this call-to-action is slightly unintuitive. Could it potentially be another element above or below logout with similar styling (you can probably use that switch icon if you'd like).
@@ -27,12 +28,21 @@ function ServiceAccount({user, next, update}) { | |||
window.location = '/' | |||
} | |||
}) | |||
const me = useContext(CurrentUserContext) | |||
|
|||
function handleImpressonateClick() { |
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.
rename to handleImpersonateClick
. Also I think this should probably be a useCallback
hook accepting mutation as a dependency, although I suspect it wouldn't actually matter
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 catch, it's my GitHub Copilot's mistake :)
No need for a useCallback here imo.
Summary
Fixes #180