|
@@ -2,7 +2,6 @@ import React, {
|
|
|
useState, useEffect, useCallback,
|
|
useState, useEffect, useCallback,
|
|
|
} from 'react';
|
|
} from 'react';
|
|
|
|
|
|
|
|
-import { USER_STATUS } from '@growi/core';
|
|
|
|
|
import { useTranslation } from 'next-i18next';
|
|
import { useTranslation } from 'next-i18next';
|
|
|
import { useRouter } from 'next/router';
|
|
import { useRouter } from 'next/router';
|
|
|
import ReactCardFlip from 'react-card-flip';
|
|
import ReactCardFlip from 'react-card-flip';
|
|
@@ -95,16 +94,12 @@ export const LoginForm = (props: LoginFormProps): JSX.Element => {
|
|
|
|
|
|
|
|
try {
|
|
try {
|
|
|
const res = await apiv3Post('/login', { loginForm });
|
|
const res = await apiv3Post('/login', { loginForm });
|
|
|
- const { redirectTo, userStatus } = res.data;
|
|
|
|
|
|
|
+ const { redirectTo } = res.data;
|
|
|
|
|
|
|
|
if (redirectTo != null) {
|
|
if (redirectTo != null) {
|
|
|
return router.push(redirectTo);
|
|
return router.push(redirectTo);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if (userStatus !== USER_STATUS.ACTIVE) {
|
|
|
|
|
- window.location.href = '/';
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
return router.push('/');
|
|
return router.push('/');
|
|
|
}
|
|
}
|
|
|
catch (err) {
|
|
catch (err) {
|