File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import * as Types from "../../api/types"
3
3
import * as API from "../../api"
4
4
5
5
export interface UserContext {
6
- getUserError ?: Error | unknown // unknown is a concession while I work out typing issues
6
+ getUserError ?: Error | unknown
7
7
authError ?: Error | unknown
8
8
me ?: Types . UserResponse
9
9
}
@@ -23,7 +23,7 @@ export const userMachine =
23
23
data : Types . UserResponse
24
24
}
25
25
signIn : {
26
- data : Types . LoginResponse | undefined
26
+ data : Types . LoginResponse
27
27
}
28
28
} ,
29
29
} ,
@@ -110,10 +110,8 @@ export const userMachine =
110
110
} ,
111
111
{
112
112
services : {
113
- signIn : async ( _ , event : UserEvent ) => {
114
- if ( event . type === "SIGN_IN" ) {
115
- return await API . login ( event . email , event . password )
116
- }
113
+ signIn : async ( _ , event ) => {
114
+ return await API . login ( event . email , event . password )
117
115
} ,
118
116
signOut : API . logout ,
119
117
getMe : API . getUser ,
You can’t perform that action at this time.
0 commit comments