@ombori/ga-messaging
Advanced tools
Comparing version 2.14.2 to 2.14.3
@@ -6,2 +6,13 @@ # Change Log | ||
## [2.14.3](https://github.com/ombori/gridapp/compare/v2.14.2...v2.14.3) (2020-10-05) | ||
### Bug Fixes | ||
* display spinner when theres no connection to the server ([09f38fc](https://github.com/ombori/gridapp/commit/09f38fcaa357097118b50e7aca906ef72cf10dec)) | ||
## [2.14.2](https://github.com/ombori/gridapp/compare/v2.14.1...v2.14.2) (2020-10-05) | ||
@@ -8,0 +19,0 @@ |
@@ -8,2 +8,3 @@ export declare type Message = { | ||
export declare const setSpaceId: (spaceId: string) => void; | ||
export declare const useStatus: () => boolean; | ||
declare const _default: { | ||
@@ -13,4 +14,5 @@ usePublish: () => (message: Message) => void; | ||
setSpaceId: (spaceId: string) => void; | ||
useStatus: () => boolean; | ||
}; | ||
export default _default; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -76,2 +76,10 @@ import React from 'react'; | ||
}; | ||
export default { usePublish: usePublish, useSubscribe: useSubscribe, setSpaceId: setSpaceId }; | ||
export var useStatus = function () { | ||
var _a = React.useState(false), conn = _a[0], setConn = _a[1]; | ||
React.useEffect(function () { | ||
var int = setInterval(function () { return setConn(socket && socket.readyState == socket.OPEN); }, 1000); | ||
return function () { return clearInterval(int); }; | ||
}, []); | ||
return conn; | ||
}; | ||
export default { usePublish: usePublish, useSubscribe: useSubscribe, setSpaceId: setSpaceId, useStatus: useStatus }; |
{ | ||
"name": "@ombori/ga-messaging", | ||
"version": "2.14.2", | ||
"version": "2.14.3", | ||
"main": "dist/index.js", | ||
@@ -16,3 +16,7 @@ "license": "UNLICENSED", | ||
}, | ||
"gitHead": "576ef96bf6f668f99fe680b60ebdee92f11f5936" | ||
"dependencies": { | ||
"react-fontawesome": "^1.7.1", | ||
"react-loader-icon": "^1.0.1" | ||
}, | ||
"gitHead": "591b26ca6d4ae8e07de546e036e16e70ae12045b" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9572
207
3
+ Addedreact-fontawesome@^1.7.1
+ Addedreact-loader-icon@^1.0.1
+ Addedreact-fontawesome@1.7.1(transitive)
+ Addedreact-loader-icon@1.0.1(transitive)