Show proper spinners
This commit is contained in:
parent
5a31771b4b
commit
446d5be62b
6 changed files with 31 additions and 73 deletions
|
@ -7,6 +7,7 @@ import { Actions, useStoreActions } from 'easy-peasy';
|
|||
import { StaticContext } from 'react-router';
|
||||
import FlashMessageRender from '@/components/FlashMessageRender';
|
||||
import { ApplicationStore } from '@/state';
|
||||
import Spinner from '@/components/elements/Spinner';
|
||||
|
||||
export default ({ history, location: { state } }: RouteComponentProps<{}, StaticContext, { token?: string }>) => {
|
||||
const [ code, setCode ] = useState('');
|
||||
|
@ -71,7 +72,7 @@ export default ({ history, location: { state } }: RouteComponentProps<{}, Static
|
|||
disabled={isLoading || code.length !== 6}
|
||||
>
|
||||
{isLoading ?
|
||||
<span className={'spinner white'}> </span>
|
||||
<Spinner size={'tiny'} className={'mx-auto'}/>
|
||||
:
|
||||
'Continue'
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@ import Field from '@/components/elements/Field';
|
|||
import { httpErrorToHuman } from '@/api/http';
|
||||
import { FlashMessage } from '@/state/flashes';
|
||||
import ReCAPTCHA from 'react-google-recaptcha';
|
||||
import Spinner from '@/components/elements/Spinner';
|
||||
|
||||
type OwnProps = RouteComponentProps & {
|
||||
clearFlashes: ActionCreator<void>;
|
||||
|
@ -63,7 +64,7 @@ const LoginContainer = ({ isSubmitting, setFieldValue, values, submitForm, handl
|
|||
className={'btn btn-primary btn-jumbo'}
|
||||
>
|
||||
{isSubmitting ?
|
||||
<span className={'spinner white'}> </span>
|
||||
<Spinner size={'tiny'} className={'mx-auto'}/>
|
||||
:
|
||||
'Login'
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@ import LoginFormContainer from '@/components/auth/LoginFormContainer';
|
|||
import FlashMessageRender from '@/components/FlashMessageRender';
|
||||
import { Actions, useStoreActions } from 'easy-peasy';
|
||||
import { ApplicationStore } from '@/state';
|
||||
import Spinner from '@/components/elements/Spinner';
|
||||
|
||||
type Props = Readonly<RouteComponentProps<{ token: string }> & {}>;
|
||||
|
||||
|
@ -89,7 +90,7 @@ export default (props: Props) => {
|
|||
disabled={isLoading || !canSubmit()}
|
||||
>
|
||||
{isLoading ?
|
||||
<span className={'spinner white'}> </span>
|
||||
<Spinner size={'tiny'} className={'mx-auto'}/>
|
||||
:
|
||||
'Reset Password'
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue