@esvndev/es-react-config-setting 1.0.70 → 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.js CHANGED
@@ -19023,6 +19023,7 @@ const SettingApp = (props) => {
19023
19023
 
19024
19024
  const GLOBAL_WINDOW_VARIABLE = {};
19025
19025
  let intervalId = null;
19026
+ var TIME_RELOAD = 15000;
19026
19027
  //Load interval data default
19027
19028
  const INIT_CONFIG_SETTING = () => {
19028
19029
  _LOAD_(null);
@@ -19032,11 +19033,14 @@ const INIT_CONFIG_SETTING = () => {
19032
19033
  }
19033
19034
  intervalId = setInterval(() => {
19034
19035
  _FETCH_AND_UPDATE();
19035
- }, 5000);
19036
+ }, TIME_RELOAD);
19036
19037
  };
19037
19038
  const _FETCH_AND_UPDATE = () => {
19038
19039
  GetSettingConfigClient((data) => {
19039
19040
  try {
19041
+ if (data?.isupdatetime) {
19042
+ TIME_RELOAD = (data?.timeupdate < 5000 || data?.timeupdate > 300000) ? 5000 : data?.timeupdate;
19043
+ }
19040
19044
  if (data?.status && data?.isupdate && data?.data) {
19041
19045
  localStorage.setItem("init_config_setting", JSON.stringify(data.data));
19042
19046
  localStorage.setItem("app_config_setting_version", data.version);