diff --git a/package-lock.json b/package-lock.json index 8cc5c13..d4cb370 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "ucentral-libs", - "version": "1.0.57", + "version": "1.0.59", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "ucentral-libs", - "version": "1.0.57", + "version": "1.0.59", "license": "BSD-3-Clause", "dependencies": { "@coreui/coreui": "^3.4.0", diff --git a/package.json b/package.json index d438674..f6efd53 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ucentral-libs", - "version": "1.0.57", + "version": "1.0.59", "main": "dist/index.js", "source": "src/index.js", "engines": { @@ -19,10 +19,10 @@ "libphonenumber-js": "^1.9.37", "lodash": "^4.17.21", "react-flow-renderer": "^9.6.6", + "react-i18next": "^11.11.0", "react-paginate": "^7.1.3", "react-phone-input-2": "^2.14.0", "react-router-dom": "^5.2.0", - "react-i18next": "^11.11.0", "react-select": "^4.3.1", "react-tooltip": "^4.2.21", "uuid": "^8.3.2" diff --git a/src/components/CopyToClipboardButton/index.js b/src/components/CopyToClipboardButton/index.js index 051c970..c789ae5 100644 --- a/src/components/CopyToClipboardButton/index.js +++ b/src/components/CopyToClipboardButton/index.js @@ -1,23 +1,27 @@ -import React, { useState } from 'react'; +import React from 'react'; import CIcon from '@coreui/icons-react'; import { cilClone } from '@coreui/icons'; import PropTypes from 'prop-types'; import { CButton, CPopover } from '@coreui/react'; +import { useToast } from 'contexts/ToastProvider'; const CopyToClipboardButton = ({ t, content, size }) => { - const [result, setResult] = useState(''); + const { addToast } = useToast(); const copyToClipboard = () => { navigator.clipboard.writeText(content); - setResult(t('common.copied')); + addToast({ + title: t('common.success'), + body: t('common.copied_to_clipboard'), + color: 'success', + autohide: true, + }); }; return ( - {' '} - {result || ''} ); diff --git a/src/pages/LoginPage/AccountVerificationForm.js b/src/pages/LoginPage/AccountVerificationForm.js index 3db8e52..ac119f6 100644 --- a/src/pages/LoginPage/AccountVerificationForm.js +++ b/src/pages/LoginPage/AccountVerificationForm.js @@ -35,7 +35,7 @@ const AccountVerificationForm = ({ }; return ( - onKeyDown(e, validateVerificationCode)}> + onKeyDown(e, validateVerificationCode)} onSubmit={validate}>

{t('login.account_verification')}
@@ -62,6 +62,7 @@ const AccountVerificationForm = ({ color="primary" onClick={resendCode} disabled={sending || validating} + type="button" > {sending ? t('login.sending_ellipsis') : t('user.send_code_again')}