Skip to content

Commit e8df945

Browse files
authored
Merge pull request #2909 from objectcomputing/feature-2908/fix-profile-editing
Fixed a few obsolete profile references
2 parents 65d64e5 + 4e81af8 commit e8df945

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

web-ui/src/context/reducer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ export const reducer = (state, action) => {
172172
break;
173173
case UPDATE_MEMBER_PROFILES:
174174
action.payload.forEach(convertMemberDates);
175-
const currentProfileId = state?.userProfile?.memberProfile?.id;
175+
const currentProfileId = state?.userProfile?.id;
176176
const currentProfile = action.payload.find((current) => {
177177
if(currentProfileId && current.id === currentProfileId) {
178178
return current;

web-ui/src/pages/MemberProfilePage.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ const MemberProfilePage = () => {
8282
const [selectedMemberSkills, setSelectedMemberSkills] = useState([]);
8383
const [teams, setTeams] = useState([]);
8484
const [guilds, setGuilds] = useState([]);
85-
const isCurrentUser = userProfile?.memberProfile?.id === memberId;
85+
const isCurrentUser = userProfile?.id === memberId;
8686

8787
useEffect(() => {
8888
async function getTeamsAndGuilds() {

web-ui/src/pages/MemberProfilePage.test.jsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,7 @@ const initialState = {
1111
{ name: 'mr. test', firstName: 'mr', lastName: 'test', id: '1234' }
1212
],
1313
userProfile: {
14-
memberProfile: {
15-
id: '1234',
16-
name: 'mr. test'
17-
}
14+
id: '1234',
1815
}
1916
}
2017
};

0 commit comments

Comments
 (0)