diff options
Diffstat (limited to 'app')
| -rw-r--r-- | app/redux/connection/actions.js | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/app/redux/connection/actions.js b/app/redux/connection/actions.js index bb155aa485..915eedd273 100644 --- a/app/redux/connection/actions.js +++ b/app/redux/connection/actions.js @@ -4,21 +4,14 @@ import { Clipboard } from 'reactxp'; import type { ReduxThunk } from '../store'; import type { Ip } from '../../lib/daemon-rpc'; -const copyIPAddress = (): ReduxThunk => { - return (_, getState) => { - const ip = getState().connection.ip; - if (ip) { - Clipboard.setText(ip); - } - }; -}; - type ConnectingAction = { type: 'CONNECTING', }; + type ConnectedAction = { type: 'CONNECTED', }; + type DisconnectedAction = { type: 'DISCONNECTED', }; @@ -88,12 +81,21 @@ function offline(): OfflineAction { }; } +function copyIPAddress(): ReduxThunk { + return (_, getState) => { + const ip = getState().connection.ip; + if (ip) { + Clipboard.setText(ip); + } + }; +} + export default { - copyIPAddress, newLocation, connecting, connected, disconnected, online, offline, + copyIPAddress, }; |
