|
|
@ -38,7 +38,7 @@ const LoginMessage: React.FC<{ |
|
|
const Login: React.FC = () => { |
|
|
const Login: React.FC = () => { |
|
|
const [userLoginState, setUserLoginState] = useState<API.LoginResult>({}); |
|
|
const [userLoginState, setUserLoginState] = useState<API.LoginResult>({}); |
|
|
const [type, setType] = useState<string>('account'); |
|
|
const [type, setType] = useState<string>('account'); |
|
|
const { initialState, setInitialState } = useModel('@@initialState'); |
|
|
const { initialState, refresh, setInitialState } = useModel('@@initialState'); |
|
|
|
|
|
|
|
|
const intl = useIntl(); |
|
|
const intl = useIntl(); |
|
|
|
|
|
|
|
|
@ -63,6 +63,7 @@ const Login: React.FC = () => { |
|
|
}); |
|
|
}); |
|
|
message.success(defaultLoginSuccessMessage); |
|
|
message.success(defaultLoginSuccessMessage); |
|
|
await fetchUserInfo(); |
|
|
await fetchUserInfo(); |
|
|
|
|
|
await refresh(); |
|
|
const urlParams = new URL(window.location.href).searchParams; |
|
|
const urlParams = new URL(window.location.href).searchParams; |
|
|
history.push(urlParams.get('redirect') || '/'); |
|
|
history.push(urlParams.get('redirect') || '/'); |
|
|
return; |
|
|
return; |
|
|
|