This repository was archived by the owner on Mar 13, 2025. It is now read-only.
File tree 4 files changed +21
-4
lines changed
4 files changed +21
-4
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ module.exports = {
5
5
TC_NOTIFICATION_URL : "https://api.topcoder-dev.com/v5/notifications" ,
6
6
CONNECT_DOMAIN : "https://connect.topcoder-dev.com" ,
7
7
COMMUNITY_DOMAIN : "https://www.topcoder-dev.com" ,
8
- PLATFORM_DOMAIN : "https://local .topcoder-dev.com" ,
8
+ PLATFORM_DOMAIN : "https://platform .topcoder-dev.com" ,
9
9
TAAS_APP : "https://platform.topcoder-dev.com/taas/myteams" ,
10
10
} ,
11
11
API : {
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ import {
20
20
setNotificationPlatform ,
21
21
disableNavigationForRoute ,
22
22
enableNavigationForRoute ,
23
+ updateUserProfile ,
23
24
} from "./utils/exports" ;
24
25
25
26
import { login , businessLogin , logout } from "./utils" ;
@@ -51,5 +52,6 @@ export {
51
52
setNotificationPlatform ,
52
53
disableNavigationForRoute ,
53
54
enableNavigationForRoute ,
55
+ updateUserProfile ,
54
56
PLATFORM ,
55
57
} ;
Original file line number Diff line number Diff line change 6
6
import _ from "lodash" ;
7
7
import { bindActionCreators } from "redux" ;
8
8
import store from "../store" ;
9
+ import actions from "../actions" ;
9
10
import menuActions from "../actions/menu" ;
10
11
import authActions from "../actions/auth" ;
11
12
import notificationActions from "../actions/notifications" ;
@@ -77,3 +78,18 @@ export const getAuthUserTokens = () => {
77
78
} ) ;
78
79
}
79
80
} ;
81
+
82
+ /**
83
+ * Updates user profile
84
+ */
85
+ export const updateUserProfile = ( firstName , lastName ) => {
86
+ const { auth } = store . getState ( ) ;
87
+
88
+ const newProfile = {
89
+ ...auth . profile ,
90
+ firstName,
91
+ lastName,
92
+ } ;
93
+
94
+ store . dispatch ( actions . auth . loadProfile ( newProfile || null ) ) ;
95
+ } ;
Original file line number Diff line number Diff line change 1
1
import _ from "lodash" ;
2
2
import moment from "moment" ;
3
3
import config from "../../config" ;
4
- import { PLATFORM_DOMAIN } from "../constants" ;
5
4
6
5
/**
7
6
* Generate Logout URL
@@ -35,7 +34,7 @@ export const getBusinessLoginUrl = () =>
35
34
*/
36
35
export const getSelfServiceLoginUrl = ( ) =>
37
36
`${ config . URL . AUTH } ?retUrl=${ encodeURIComponent (
38
- `${ PLATFORM_DOMAIN } /self-service`
37
+ `${ window . location . origin } /self-service`
39
38
) } ®Source=tcBusiness&mode=login`;
40
39
41
40
/**
@@ -45,7 +44,7 @@ export const getSelfServiceLoginUrl = () =>
45
44
*/
46
45
export const getSelfServiceSignupUrl = ( ) =>
47
46
`${ config . URL . AUTH } ?retUrl=${ encodeURIComponent (
48
- `${ PLATFORM_DOMAIN } /self-service`
47
+ `${ window . location . origin } /self-service`
49
48
) } ®Source=tcBusiness&mode=signUp`;
50
49
51
50
/**
You can’t perform that action at this time.
0 commit comments