Skip to content

Commit

Permalink
removed reducer/selector for mentions
Browse files Browse the repository at this point in the history
  • Loading branch information
cyrusjc committed May 24, 2024
1 parent dca28e6 commit 64ffb6d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
10 changes: 0 additions & 10 deletions webapp/src/reducers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,15 +107,6 @@ function sidebarContent(state = {
}
}

function mentionDetails(state: PrsDetailsData[] = [], action: {type: string, data: PrsDetailsData[]}) {
switch (action.type) {
case ActionTypes.RECEIVED_YOUR_PRS_DETAILS:
return action.data;
default:
return state;
}
}

function yourRepos(state: YourReposData[] = [], action: {type: string, data: YourReposData[]}) {
switch (action.type) {
case ActionTypes.RECEIVED_REPOSITORIES:
Expand Down Expand Up @@ -233,7 +224,6 @@ export default combineReducers({
configuration,
clientId,
reviewDetails,
mentionDetails,
yourRepos,
yourPrDetails,
mentions,
Expand Down
4 changes: 2 additions & 2 deletions webapp/src/selectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ export const getSidebarData = createSelector(
getPluginState,

(pluginState): SidebarData => {
const {username, mentionDetails, sidebarContent, reviewDetails, yourPrDetails, organization, rhsState} = pluginState;
const {username, sidebarContent, reviewDetails, yourPrDetails, organization, rhsState} = pluginState;
return {
username,
mentions: mapPrsToDetails(sidebarContent.mentions || emptyArray, mentionDetails),
mentions: sidebarContent.mentions || emptyArray,
reviews: mapPrsToDetails(sidebarContent.reviews || emptyArray, reviewDetails),
yourPrs: mapPrsToDetails(sidebarContent.prs || emptyArray, yourPrDetails),
yourAssignments: sidebarContent.assignments || emptyArray,
Expand Down

0 comments on commit 64ffb6d

Please sign in to comment.