How to use the reapop.notify function in reapop

To help you get started, we’ve selected a few reapop 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 hooram / ownphotos-frontend / src / actions / photosActions.js View on Github external
.then(response => {
        dispatch({
          type: "SET_PHOTOS_HIDDEN_FULFILLED",
          payload: {
            image_hashes: image_hashes,
            hidden: hidden,
            updatedPhotos: response.data.updated
          }
        });
        if (hidden) {
          var notificationMessage = "were successfully hidden";
        } else {
          var notificationMessage = "were successfully unhidden";
        }
        dispatch(
          notify({
            message: `${response.data.updated.length} photo(s) ` + notificationMessage,
            title: "Hide photos",
            status: "success",
            dismissible: true,
            dismissAfter: 3000,
            position: "br"
          })
        );
        if (image_hashes.length === 1) {
          dispatch(fetchPhotoDetail(image_hashes[0]));
        }
      })
      .catch(err => {
github hooram / ownphotos-frontend / src / actions / utilActions.js View on Github external
.then(response => {
        dispatch(
          notify({
            message: "Generate Event Albums started",
            title: "Generate Event Albums",
            status: "success",
            dismissible: true,
            dismissAfter: 3000,
            position: "br"
          })
        );
        dispatch({
          type: "GENERATE_EVENT_ALBUMS_FULFILLED",
          payload: response.data
        });
      })
      .catch(err => {
github hooram / ownphotos-frontend / src / actions / albumsActions.js View on Github external
.then(response => {
        dispatch({
          type: "EDIT_USER_ALBUMS_LIST_FULFILLED",
          payload: response.data
        });
        dispatch(
          notify({
            message: `${
              image_hashes.length
            } photo(s) were successfully added to existing album "${title}"`,
            title: "Add to album",
            status: "success",
            dismissible: true,
            dismissAfter: 3000,
            position: "br",
            buttons:[{
              name:'View Album', 
              primary:true, 
              onClick: ()=>{
                dispatch(fetchUserAlbum(album_id))
                dispatch(push(`/useralbum/${album_id}/`))
              }
            }]
github hooram / ownphotos-frontend / src / actions / facesActions.js View on Github external
.then(response => {
        dispatch({
          type: "DELETE_FACES_FULFILLED",
          payload: response.data.results
        });
        dispatch(
          notify({
            message: `${
              response.data.results.length
            } face(s) were successfully deleted`,
            title: "Face delete",
            status: "success",
            dismissible: true,
            dismissAfter: 3000,
            position: "br"
          })
        );
      })
      .catch(err => {
github blockstack / blockstack-browser / app / js / profiles / store / registration / actions.js View on Github external
zoneFile
        )

        if (res.error) {
          logger.error(res.error)
          let message =
            `Sorry, something went wrong while registering ${domainName}. ` +
            'You can try to register again later from your profile page. Some ' +
            'apps may be unusable until you do.'
          if (res.status === 409) {
            message =
              "Sorry, it looks like we weren't able to process your name registration. Please contact us at support@blockstack.org for help. Some apps may be unusable until you register an ID."
          }
          dispatch(registrationError(message))
          dispatch(
            notify({
              title: 'Username Registration Failed',
              message,
              status: 'error',
              dismissAfter: 6000,
              dismissible: true,
              closeButton: true,
              position: 'b'
            })
          )
        } else {
          logger.debug(`Successfully submitted registration for ${domainName}`)
          dispatch(registrationSubmitted())
          dispatch(IdentityActions.addUsername(identityIndex, domainName))
        }
      } catch (e) {
        logger.error('registerName: error POSTing registration to registrar', e)

reapop

A simple & customizable notifications system for React

MIT
Latest version published 1 year ago

Package Health Score

54 / 100
Full package analysis