remove mock login
This commit is contained in:
parent
031434488d
commit
33f2341ed3
@ -1,4 +1,4 @@
|
||||
import {Button, Space, Spin, Typography} from "@douyinfe/semi-ui";
|
||||
import {Space, Spin, Typography} from "@douyinfe/semi-ui";
|
||||
import {useTranslation} from 'react-i18next';
|
||||
import {useEffect} from "react";
|
||||
import {useSetState} from "ahooks";
|
||||
@ -29,7 +29,7 @@ const SubmitContainer = styled.div({
|
||||
|
||||
const LoginURL = getAppUrl() + '/login/auth'
|
||||
const AuthLogin = ({type}:{type?:'auth'|'login'}) => {
|
||||
const {login, mockLogin,user} = useAuth();
|
||||
const {login,user} = useAuth();
|
||||
const navigate = useNavigate();
|
||||
const [state, setState] = useSetState({
|
||||
showLogin: false,
|
||||
@ -75,12 +75,6 @@ const AuthLogin = ({type}:{type?:'auth'|'login'}) => {
|
||||
}
|
||||
}, [])
|
||||
|
||||
const handleMockLogin = () => {
|
||||
mockLogin().then(() => {
|
||||
navigate('/dashboard')
|
||||
})
|
||||
}
|
||||
|
||||
return (<LoginContainer>
|
||||
<LogoContainer>
|
||||
<Space spacing={10} vertical>
|
||||
@ -99,8 +93,6 @@ const AuthLogin = ({type}:{type?:'auth'|'login'}) => {
|
||||
>
|
||||
<span className="semi-button-content" x-semi-prop="children">{t('login.submit')}</span>
|
||||
</a>
|
||||
<Button theme='solid' type='warning' block onClick={handleMockLogin} style={{marginTop: 5}}>MOCK
|
||||
LOGIN</Button>
|
||||
</div>}
|
||||
</SubmitContainer>
|
||||
</LoginContainer>)
|
||||
|
Loading…
x
Reference in New Issue
Block a user