From 64ffb6d3f6f6488afebe485d5796081f680c3752 Mon Sep 17 00:00:00 2001 From: Cyrus Cheung Date: Fri, 24 May 2024 01:53:09 -0700 Subject: [PATCH] removed reducer/selector for mentions --- webapp/src/reducers/index.ts | 10 ---------- webapp/src/selectors.ts | 4 ++-- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/webapp/src/reducers/index.ts b/webapp/src/reducers/index.ts index 79a237c77..6da684928 100644 --- a/webapp/src/reducers/index.ts +++ b/webapp/src/reducers/index.ts @@ -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: @@ -233,7 +224,6 @@ export default combineReducers({ configuration, clientId, reviewDetails, - mentionDetails, yourRepos, yourPrDetails, mentions, diff --git a/webapp/src/selectors.ts b/webapp/src/selectors.ts index 44b76d0df..7861709d8 100644 --- a/webapp/src/selectors.ts +++ b/webapp/src/selectors.ts @@ -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,