How to use the react-redux-loading-bar.hideLoading function in react-redux-loading-bar

To help you get started, we’ve selected a few react-redux-loading-bar examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nginyc / rafiki / web / src / sagas / JobsSagas.js View on Github external
export function* getTrialsListOfJob(action) {
    try {
        // Get Trials list and display notification 
        yield put(showLoading()) 
        const token = yield select(getToken)
        yield call(getJobsList, action)
        console.log("Getting Trials List of Job")
        const trialsList = yield call(api.requestTrialsOfJob, {}, token, action.app, action.appVersion) 
        yield put(actions.populateTrialsToJobs(trialsList.data, action.app, action.appVersion))
        yield put(hideLoading())
    } catch(e) {
        console.error(e.response)
        console.error(e)
        yield put(notificationShow("Failed to Fetch TrialsList"))
    }
}
github jsdrupal / drupal-admin-ui / packages / admin-ui / src / actions / content.js View on Github external
// Get the content types from the redux state
    const contentTypes = yield select(contentTypesSelector);
    // Extract the content type from the content data
    const contentType = extractContentType(content);
    // Map the content type to the human-readable name
    const contentName =
      mapContentTypeToName(contentTypes, contentType) || 'unknown';

    yield put(push('/admin/content'));
    yield put(setSuccessMessage(`New ${contentName} added successfully`));
  } catch (error) {
    const errorMessage = yield ApiError.errorToHumanString(error);
    yield put(setErrorMessage(errorMessage));
  } finally {
    yield put(hideLoading());
  }
}
github jsdrupal / drupal-admin-ui / src / actions / simpleConfig.js View on Github external
},
        method: 'PATCH',
      },
    );
    yield put(setMessage('Changes have been saved', MESSAGE_SUCCESS));
    yield put({
      type: SIMPLE_CONFIG_POSTED,
      payload: {
        name,
        config,
      },
    });
  } catch (error) {
    yield put(setMessage(error.toString()));
  } finally {
    yield put(hideLoading());
    if (yield cancelled()) {
      // do a thing
    }
  }
}
github JimmyLv / nobackend.website / src / react / redux / actions / index.js View on Github external
.then(content => {
        dispatch(hideLoading())
        return dispatch(receiveArticle(content, id))
      })
      .catch(error => console.info('request error: ', error))
github nginyc / rafiki / web / src / sagas / JobsSagas.js View on Github external
export function* postTrainJob(action) {
    try {
        yield put(showLoading())
        const token = yield select(getToken)
        yield call(api.postCreateTrainJob, action.json, token)
        yield put(notificationShow("Create TrainJob success"))
        yield put(hideLoading())
        yield put(push('/console/jobs/list-train-jobs'))
    } catch (e) {
        yield call(alert, e.response.data)
        console.error(e.response)
        console.error(e)
        yield put(notificationShow("fail to Create TrainJob"))
    }
}
github jsdrupal / drupal-admin-ui / packages / admin-ui / src / actions / content.js View on Github external
if (!Object.keys(queryString.filter).length) {
      delete queryString.filter;
    }

    const contentList = yield call(api, 'content', { queryString });
    yield put({
      type: CONTENT_LOADED,
      payload: {
        contentList,
      },
    });
  } catch (error) {
    const errorMessage = yield ApiError.errorToHumanString(error);
    yield put(setErrorMessage(errorMessage));
  } finally {
    yield put(hideLoading());
  }
}
github LastDreamer / react-router-prefetch / stories / components / Page4.jsx View on Github external
setTimeout(() => {
        props.dispatch(hideLoading());

        reject(props);
      }, 1000);
    });
github JimmyLv / demo.zeit-nextjs / store / saga / index.js View on Github external
function* fetchGuys() {
  try {
    yield take(actionTypes.SAY_HELLO)
    yield put(showLoading())
    const json = yield call(fetchData, 'https://jimmylv.github.io/api/guys.json')
    yield put({ type: actionTypes.SAY_HELLO_DONE, payload: json })
  } catch (err) {
    yield put({ type: actionTypes.SAY_HELLO_ERROR, payload: err })
  } finally {
    yield put(hideLoading())
  }
}
github CodeChain-io / codechain-explorer / src / request / ApiRequest.tsx View on Github external
const hideLoadingBar = () => {
        if (showProgressBar) {
            dispatch(hideLoading(progressBarTarget));
        }
    };
github sshwsfc / xadmin / packages / xadmin-plugins / src / loading.js View on Github external
takeEvery('END_LOADING', function *() {
        yield put(hideLoading())
      })
    ])

react-redux-loading-bar

Simple Loading Bar for Redux and React

MIT
Latest version published 12 months ago

Package Health Score

53 / 100
Full package analysis