@ombori/ga-settings
Advanced tools
Comparing version 2.20.7 to 2.35.1
@@ -6,2 +6,13 @@ # Change Log | ||
## [2.35.1](https://github.com/ombori/gridapp/compare/v2.35.0...v2.35.1) (2021-02-26) | ||
### Bug Fixes | ||
* useSettings works even if the component wasnt mounted on app start ([24c0876](https://github.com/ombori/gridapp/commit/24c0876efe1654c38aeff858719929ba35b382a6)) | ||
## [2.20.7](https://github.com/ombori/gridapp/compare/v2.20.6...v2.20.7) (2020-12-02) | ||
@@ -8,0 +19,0 @@ |
import { useEffect, useState } from 'react'; | ||
var globalSettings = null; | ||
export function useSettings() { | ||
var _a = useState(null), settings = _a[0], setSettings = _a[1]; | ||
var _a = useState(globalSettings), settings = _a[0], setSettings = _a[1]; | ||
useEffect(function () { | ||
@@ -18,2 +19,3 @@ if (!process.env.NODE_ENV || process.env.NODE_ENV === 'development') { | ||
var settings = gridapp.getSettings(); | ||
globalSettings = settings; | ||
setSettings(settings); | ||
@@ -20,0 +22,0 @@ }); |
{ | ||
"name": "@ombori/ga-settings", | ||
"version": "2.20.7", | ||
"version": "2.35.1", | ||
"main": "dist/index.js", | ||
@@ -19,3 +19,3 @@ "license": "UNLICENSED", | ||
}, | ||
"gitHead": "4cb40d4939238abab6b1424c1d545750dfa03f6b" | ||
"gitHead": "4da5f5d89fd95934793151ac32e9a32055775365" | ||
} |
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
6691
95