File tree Expand file tree Collapse file tree 4 files changed +8
-14
lines changed Expand file tree Collapse file tree 4 files changed +8
-14
lines changed Original file line number Diff line number Diff line change @@ -29,10 +29,7 @@ const reducers = (
2929 case ASYNC_REQUEST_FAILED_ACTION :
3030 return {
3131 ...state ,
32- tokens : userAuthenticationRequestReducer (
33- state . tokens ,
34- action ,
35- ) ,
32+ tokens : userAuthenticationRequestReducer ( state . tokens , action ) ,
3633 } ;
3734 default :
3835 return state ;
Original file line number Diff line number Diff line change @@ -15,9 +15,7 @@ export const login = (
1515 . then ( ( response : TokenPayload ) => {
1616 // TODO: move this side effect somewhere else
1717 tokenService . setRefreshToken ( response . refreshToken ) ;
18- dispatch (
19- authenticateUser . loaded ( response ) ,
20- ) ;
18+ dispatch ( authenticateUser . loaded ( response ) ) ;
2119 } )
2220 . catch ( ( error ) => {
2321 dispatch ( authenticateUser . failed ( error . response . data ) ) ;
@@ -34,9 +32,7 @@ export const signup = (
3432 . then ( ( response ) => {
3533 // TODO: move this side effect somewhere else
3634 tokenService . setRefreshToken ( response . refreshToken ) ;
37- dispatch (
38- authenticateUser . loaded ( response ) ,
39- ) ;
35+ dispatch ( authenticateUser . loaded ( response ) ) ;
4036 } )
4137 . catch ( ( error ) => {
4238 dispatch ( authenticateUser . failed ( error . response . data ) ) ;
Original file line number Diff line number Diff line change @@ -93,9 +93,9 @@ const Signup: React.FC<SignupProps> = ({ tokens }) => {
9393 !
9494 </ Paragraph >
9595
96- { tokens . kind === AsyncRequestKinds . Failed && < Paragraph >
97- { tokens . error }
98- </ Paragraph > }
96+ { tokens . kind === AsyncRequestKinds . Failed && (
97+ < Paragraph > { tokens . error } </ Paragraph >
98+ ) }
9999 < Form . Item >
100100 < Button type = "primary" htmlType = "submit" >
101101 Submit
Original file line number Diff line number Diff line change @@ -11,7 +11,8 @@ import {
1111 rehydrateAsyncRequest ,
1212} from '../asyncRequest' ;
1313import {
14- PrivilegeLevel , TokenPayload ,
14+ PrivilegeLevel ,
15+ TokenPayload ,
1516 UserAuthenticationReducerState ,
1617} from '../../auth/ducks/types' ;
1718
You can’t perform that action at this time.
0 commit comments