diff options
author | ThibG <thib@sitedethib.com> | 2019-08-30 00:18:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-30 00:18:08 +0200 |
commit | 2848c08953a8555e06791170dbf1090575e05d8a (patch) | |
tree | 53e8e98051c24ac4fb32ce5692e241b6a6391de3 /app/javascript/flavours/glitch/features/compose/components/header.js | |
parent | 79725f659d5e9c449df0ff73f9363407a0a064bd (diff) | |
parent | 969d04385157175dc9c9f46987976d8fc5771707 (diff) |
Merge pull request #1208 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/javascript/flavours/glitch/features/compose/components/header.js')
-rw-r--r-- | app/javascript/flavours/glitch/features/compose/components/header.js | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/features/compose/components/header.js b/app/javascript/flavours/glitch/features/compose/components/header.js index 2e29084f2..8b0f540ef 100644 --- a/app/javascript/flavours/glitch/features/compose/components/header.js +++ b/app/javascript/flavours/glitch/features/compose/components/header.js @@ -53,8 +53,18 @@ class Header extends ImmutablePureComponent { showNotificationsBadge: PropTypes.bool, intl: PropTypes.object, onSettingsClick: PropTypes.func, + onLogout: PropTypes.func.isRequired, }; + handleLogoutClick = e => { + e.preventDefault(); + e.stopPropagation(); + + this.props.onLogout(); + + return false; + } + render () { const { intl, columns, unreadNotifications, showNotificationsBadge, onSettingsClick } = this.props; @@ -114,7 +124,7 @@ class Header extends ImmutablePureComponent { ><Icon icon='cogs' /></a> <a aria-label={intl.formatMessage(messages.logout)} - data-method='delete' + onClick={this.handleLogoutClick} href={ signOutLink } title={intl.formatMessage(messages.logout)} ><Icon icon='sign-out' /></a> |