parent
cdb2896984
commit
fab0fdeb84
4 changed files with 0 additions and 63 deletions
@ -1,22 +0,0 @@ |
||||
import api from './api'; |
||||
import handleAPIError from './handleAPIError'; |
||||
|
||||
const setMapNetwork = ( |
||||
value: 0 | 1, |
||||
handleError?: (msg: Message) => void, |
||||
): void => { |
||||
api.put('/init/set-map-network', { value }).catch((error) => { |
||||
const emsg = handleAPIError(error); |
||||
|
||||
emsg.children = ( |
||||
<> |
||||
Failed to {value ? 'enable' : 'disable'} network mapping.{' '} |
||||
{emsg.children} |
||||
</> |
||||
); |
||||
|
||||
handleError?.call(null, emsg); |
||||
}); |
||||
}; |
||||
|
||||
export default setMapNetwork; |
Loading…
Reference in new issue