How to use the connected-react-router/esm/immutable.push function in connected-react-router

To help you get started, we’ve selected a few connected-react-router 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 quiltdata / quilt / catalog / app / containers / Auth / SSOGoogle.js View on Github external
async (user) => {
      const provider = 'google'
      const { id_token: token } = user.getAuthResponse()
      const result = defer()
      mutex.claim(MUTEX_REQUEST)
      try {
        dispatch(actions.signIn({ provider, token }, result.resolver))
        await result.promise
      } catch (e) {
        if (e instanceof errors.SSOUserNotFound) {
          if (cfg.ssoAuth === true) {
            dispatch(push(urls.ssoSignUp({ provider, token, next })))
            // dont release mutex on redirect
            return
          }
          notify(intl.formatMessage(msg.ssoGoogleNotFound))
        } else {
          notify(intl.formatMessage(msg.ssoGoogleErrorUnexpected))
          sentry('captureException', e)
        }
        mutex.release(MUTEX_REQUEST)
      }
    },
    [dispatch, mutex.claim, mutex.release, sentry, notify],
github quiltdata / quilt / catalog / app / website / pages / OpenLanding / Search / Search.js View on Github external
(evt) => {
      // eslint-disable-next-line default-case
      switch (evt.key) {
        case 'Enter':
          dispatch(push(urls.search({ q: value })))
          break
        case 'Escape':
          evt.target.blur()
          break
      }
    },
    [dispatch, urls, value],
github quiltdata / quilt / catalog / app / containers / NavBar / Search.js View on Github external
(evt) => {
      // eslint-disable-next-line default-case
      switch (evt.key) {
        case 'Enter':
          /* suppress onSubmit (didn't actually find this to be a problem tho) */
          evt.preventDefault()
          if (query !== value) {
            dispatch(push(makeUrl(value)))
          }
          evt.target.blur()
          break
        case 'Escape':
          evt.target.blur()
          break
      }
    },
    [dispatch, makeUrl, value, query],
github quiltdata / quilt / catalog / app / containers / NavBar / BucketSelect.js View on Github external
(to) => {
          if (to && currentBucket !== to) {
            dispatch(push(urls.bucketRoot(to)))
          }
          if (cancel) cancel()
        },
        [currentBucket, urls, dispatch, cancel],
github quiltdata / quilt / catalog / app / containers / Search / Search.js View on Github external
(newQuery) => {
      dispatch(
        push(urls.search({ q: newQuery, buckets: buckets.join(',') || undefined })),
      )
    },
    [buckets, dispatch],