@esvndev/es-react-config-setting 1.0.69 → 1.0.71

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -18996,6 +18996,7 @@ const SettingApp = (props) => {
18996
18996
 
18997
18997
  const GLOBAL_WINDOW_VARIABLE = {};
18998
18998
  let intervalId = null;
18999
+ var TIME_RELOAD = 15000;
18999
19000
  //Load interval data default
19000
19001
  const INIT_CONFIG_SETTING = () => {
19001
19002
  _LOAD_(null);
@@ -19005,11 +19006,14 @@ const INIT_CONFIG_SETTING = () => {
19005
19006
  }
19006
19007
  intervalId = setInterval(() => {
19007
19008
  _FETCH_AND_UPDATE();
19008
- }, 5000);
19009
+ }, TIME_RELOAD);
19009
19010
  };
19010
19011
  const _FETCH_AND_UPDATE = () => {
19011
19012
  GetSettingConfigClient((data) => {
19012
19013
  try {
19014
+ if (data?.isupdatetime) {
19015
+ TIME_RELOAD = (data?.timeupdate < 5000 || data?.timeupdate > 300000) ? 5000 : data?.timeupdate;
19016
+ }
19013
19017
  if (data?.status && data?.isupdate && data?.data) {
19014
19018
  localStorage.setItem("init_config_setting", JSON.stringify(data.data));
19015
19019
  localStorage.setItem("app_config_setting_version", data.version);