Merge branch 'remote-interactions-form' into 'develop'
Use onSubmit in remote interactions form See merge request soapbox-pub/soapbox-fe!1370
This commit is contained in:
commit
9009eb10cc
1 changed files with 3 additions and 3 deletions
|
@ -45,7 +45,7 @@ const UnauthorizedModal: React.FC<IUnauthorizedModal> = ({ action, onClose, acco
|
||||||
onClose('UNAUTHORIZED');
|
onClose('UNAUTHORIZED');
|
||||||
};
|
};
|
||||||
|
|
||||||
const onClickProceed: React.MouseEventHandler = e => {
|
const onSubmit: React.FormEventHandler = e => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
dispatch(remoteInteraction(apId, account))
|
dispatch(remoteInteraction(apId, account))
|
||||||
|
@ -101,7 +101,7 @@ const UnauthorizedModal: React.FC<IUnauthorizedModal> = ({ action, onClose, acco
|
||||||
secondaryText={<FormattedMessage id='account.register' defaultMessage='Sign up' />}
|
secondaryText={<FormattedMessage id='account.register' defaultMessage='Sign up' />}
|
||||||
>
|
>
|
||||||
<div className='remote-interaction-modal__content'>
|
<div className='remote-interaction-modal__content'>
|
||||||
<form className='simple_form remote-interaction-modal__fields'>
|
<form className='simple_form remote-interaction-modal__fields' onSubmit={onSubmit}>
|
||||||
<input
|
<input
|
||||||
type='text'
|
type='text'
|
||||||
placeholder={intl.formatMessage(messages.accountPlaceholder)}
|
placeholder={intl.formatMessage(messages.accountPlaceholder)}
|
||||||
|
@ -112,7 +112,7 @@ const UnauthorizedModal: React.FC<IUnauthorizedModal> = ({ action, onClose, acco
|
||||||
onChange={onAccountChange}
|
onChange={onAccountChange}
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
<Button theme='primary' onClick={onClickProceed}>{button}</Button>
|
<Button type='submit' theme='primary'>{button}</Button>
|
||||||
</form>
|
</form>
|
||||||
<div className='remote-interaction-modal__divider'>
|
<div className='remote-interaction-modal__divider'>
|
||||||
<Text align='center'>
|
<Text align='center'>
|
||||||
|
|
Loading…
Reference in a new issue