Skip to content

Commit

Permalink
feat: Add logout button for impersonation (#19445)
Browse files Browse the repository at this point in the history
  • Loading branch information
benjackwhite authored Dec 20, 2023
1 parent 47a6a1f commit 6474b85
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion frontend/src/layout/navigation/ProjectNotice.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ interface ProjectNoticeBlueprint {
export function ProjectNotice(): JSX.Element | null {
const { projectNoticeVariantWithClosability } = useValues(navigationLogic)
const { currentOrganization } = useValues(organizationLogic)
const { updateCurrentTeam } = useActions(userLogic)
const { updateCurrentTeam, logout } = useActions(userLogic)
const { user } = useValues(userLogic)
const { closeProjectNotice } = useActions(navigationLogic)
const { showInviteModal } = useActions(inviteLogic)
Expand Down Expand Up @@ -104,6 +104,11 @@ export function ProjectNotice(): JSX.Element | null {
is_impersonated: {
message: 'You are currently impersonating another user.',
type: 'warning',
action: {
'data-attr': 'stop-impersonation-cta',
onClick: () => logout(),
children: 'Logout',
},
},
}

Expand Down

0 comments on commit 6474b85

Please sign in to comment.