mirror of
https://github.com/elyby/accounts-frontend.git
synced 2025-05-31 14:11:58 +05:30
Implemented strict mode for the project (broken tests, hundreds of @ts-ignore and new errors are included) [skip ci]
This commit is contained in:
committed by
SleepWalker
parent
10e8b77acf
commit
96049ad4ad
@@ -7,7 +7,7 @@ import RegisterState from './RegisterState';
|
||||
import { AuthContext } from './AuthFlow';
|
||||
|
||||
export default class LoginState extends AbstractState {
|
||||
enter(context: AuthContext) {
|
||||
enter(context: AuthContext): Promise<void> | void {
|
||||
const login = getLogin(context.getState());
|
||||
const { user } = context.getState();
|
||||
|
||||
@@ -30,7 +30,7 @@ export default class LoginState extends AbstractState {
|
||||
payload: {
|
||||
login: string;
|
||||
},
|
||||
) {
|
||||
): Promise<void> | void {
|
||||
context
|
||||
.run('login', payload)
|
||||
.then(() => context.setState(new PasswordState()))
|
||||
@@ -39,11 +39,11 @@ export default class LoginState extends AbstractState {
|
||||
);
|
||||
}
|
||||
|
||||
reject(context: AuthContext) {
|
||||
reject(context: AuthContext): void {
|
||||
context.setState(new RegisterState());
|
||||
}
|
||||
|
||||
goBack(context: AuthContext) {
|
||||
goBack(context: AuthContext): void {
|
||||
context.run('goBack', {
|
||||
fallbackUrl: '/',
|
||||
});
|
||||
|
Reference in New Issue
Block a user