Merge pull request #11312 from influxdata/fix/11302
fix(ui): remove returnTo on logoutpull/11413/head
commit
ba9e365aca
|
@ -22,14 +22,8 @@ export class Logout extends PureComponent<Props> {
|
|||
|
||||
private handleSignOut = async () => {
|
||||
await logout()
|
||||
const {query} = this.props.location
|
||||
let returnTo = ''
|
||||
|
||||
if (query && query.returnTo) {
|
||||
returnTo = `?returnTo=${query.returnTo}`
|
||||
}
|
||||
|
||||
this.props.router.push(`/signin${returnTo}`)
|
||||
this.props.router.push(`/signin`)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,15 +1,14 @@
|
|||
// Libraries
|
||||
import React, {SFC} from 'react'
|
||||
import {Link} from 'react-router'
|
||||
import {withRouter, WithRouterProps} from 'react-router'
|
||||
|
||||
// Components
|
||||
import {Button, ComponentSize} from 'src/clockface'
|
||||
|
||||
const LogoutButton: SFC<WithRouterProps> = props => (
|
||||
<Link to={`/logout?returnTo=${props.location.pathname}`}>
|
||||
const LogoutButton: SFC = () => (
|
||||
<Link to="/logout">
|
||||
<Button text="Logout" size={ComponentSize.ExtraSmall} />
|
||||
</Link>
|
||||
)
|
||||
|
||||
export default withRouter<{}>(LogoutButton)
|
||||
export default LogoutButton
|
||||
|
|
|
@ -48,7 +48,7 @@ class SideNav extends PureComponent<Props> {
|
|||
>
|
||||
<NavMenu.SubItem
|
||||
title="Logout"
|
||||
link={`/logout?returnTo=${location.pathname}`}
|
||||
link={`/logout`}
|
||||
location={location.pathname}
|
||||
highlightWhen={[]}
|
||||
/>
|
||||
|
|
Loading…
Reference in New Issue