fix: show progress as of sign-up in SignUpForm
This commit is contained in:
@@ -40,8 +40,8 @@ function SignUpForm() {
|
|||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const authentication = useAuthentication();
|
const authentication = useAuthentication();
|
||||||
const formatMessage = useFormatMessage();
|
const formatMessage = useFormatMessage();
|
||||||
const [createUser] = useMutation(CREATE_USER);
|
const [createUser, { loading: createUserLoading }] = useMutation(CREATE_USER);
|
||||||
const [login, { loading }] = useMutation(LOGIN);
|
const [login, { loading: loginLoading }] = useMutation(LOGIN);
|
||||||
|
|
||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
if (authentication.isAuthenticated) {
|
if (authentication.isAuthenticated) {
|
||||||
@@ -165,7 +165,7 @@ function SignUpForm() {
|
|||||||
variant="contained"
|
variant="contained"
|
||||||
color="primary"
|
color="primary"
|
||||||
sx={{ boxShadow: 2, mt: 3 }}
|
sx={{ boxShadow: 2, mt: 3 }}
|
||||||
loading={loading}
|
loading={createUserLoading || loginLoading}
|
||||||
fullWidth
|
fullWidth
|
||||||
data-test="signUp-button"
|
data-test="signUp-button"
|
||||||
>
|
>
|
||||||
|
Reference in New Issue
Block a user