1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-05-07 10:36:41 +07:00

password restore dialog

This commit is contained in:
Fedor Katurov 2019-11-25 16:52:01 +07:00
parent 0cfc6357b9
commit 078c531e93
14 changed files with 270 additions and 33 deletions

View file

@ -10,9 +10,9 @@ import styles from './styles.scss';
import * as AUTH_ACTIONS from '~/redux/auth/actions';
import pick from 'ramda/es/pick';
import { selectAuthRestore } from '~/redux/auth/selectors';
import { LoaderCircle } from '~/components/input/LoaderCircle';
import { ERROR_LITERAL } from '~/constants/errors';
import { Icon } from '~/components/input/Icon';
import { useCloseOnEscape } from '~/utils/hooks';
const mapStateToProps = state => ({
restore: selectAuthRestore(state),
@ -28,7 +28,7 @@ const RestoreRequestDialogUnconnected: FC<IProps> = ({
onRequestClose,
authRequestRestoreCode,
}) => {
const [field, setField] = useState();
const [field, setField] = useState('');
const onSubmit = useCallback(
event => {
@ -76,6 +76,8 @@ const RestoreRequestDialogUnconnected: FC<IProps> = ({
[is_succesfull]
);
useCloseOnEscape(onRequestClose);
return (
<form onSubmit={onSubmit}>
<BetterScrollDialog