diff options
author | 2019-08-22 11:04:50 +0200 | |
---|---|---|
committer | 2019-08-22 11:04:50 +0200 | |
commit | 8440d51cef61297eb34a193d6a3ad420a0947340 (patch) | |
tree | c92b9f96dbcc570ddcfbd595c9dca97421b74ea9 /src/components/settings/navigation/SettingsNavigation.js | |
parent | Add development info to README (diff) | |
download | ferdium-app-8440d51cef61297eb34a193d6a3ad420a0947340.tar.gz ferdium-app-8440d51cef61297eb34a193d6a3ad420a0947340.tar.zst ferdium-app-8440d51cef61297eb34a193d6a3ad420a0947340.zip |
Add support to use custom servers
Diffstat (limited to 'src/components/settings/navigation/SettingsNavigation.js')
-rw-r--r-- | src/components/settings/navigation/SettingsNavigation.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/components/settings/navigation/SettingsNavigation.js b/src/components/settings/navigation/SettingsNavigation.js index df4b3b3b2..e1c5cabc3 100644 --- a/src/components/settings/navigation/SettingsNavigation.js +++ b/src/components/settings/navigation/SettingsNavigation.js | |||
@@ -63,6 +63,7 @@ export default @inject('stores') @observer class SettingsNavigation extends Comp | |||
63 | const { isDarkThemeActive } = stores.ui; | 63 | const { isDarkThemeActive } = stores.ui; |
64 | const { router, user } = stores; | 64 | const { router, user } = stores; |
65 | const { intl } = this.context; | 65 | const { intl } = this.context; |
66 | const isLoggedIn = Boolean(localStorage.getItem('authToken')); | ||
66 | 67 | ||
67 | return ( | 68 | return ( |
68 | <div className="settings-navigation"> | 69 | <div className="settings-navigation"> |
@@ -130,10 +131,10 @@ export default @inject('stores') @observer class SettingsNavigation extends Comp | |||
130 | </Link> | 131 | </Link> |
131 | <span className="settings-navigation__expander" /> | 132 | <span className="settings-navigation__expander" /> |
132 | <Link | 133 | <Link |
133 | to="/auth/logout" | 134 | to={ isLoggedIn ? "/auth/logout" : '/auth/welcome'} |
134 | className="settings-navigation__link" | 135 | className="settings-navigation__link" |
135 | > | 136 | > |
136 | {intl.formatMessage(messages.logout)} | 137 | { isLoggedIn ? intl.formatMessage(messages.logout) : 'Login'} |
137 | </Link> | 138 | </Link> |
138 | </div> | 139 | </div> |
139 | ); | 140 | ); |