Skip to content

Commit

Permalink
Code review fix
Browse files Browse the repository at this point in the history
Signed-off-by: Jitendra Gundaniya <[email protected]>
  • Loading branch information
jitu5 committed Jul 19, 2024
1 parent e644af4 commit 38f5258
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/reducers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ function resetDataReducer(state = {}, action) {
* @param {Object} action Redux action
* @return {Object} Updated state
*/
function updateStateFromPropsReducer(state = {}, action) {
function updateStateFromOptionsReducer(state = {}, action) {
if (action.type === UPDATE_STATE_FROM_OPTIONS) {
return merge({}, state, action.payload);
}
Expand Down Expand Up @@ -120,7 +120,7 @@ const combinedReducer = combineReducers({

const rootReducer = (state, action) => {
let newState = resetDataReducer(state, action);
newState = updateStateFromPropsReducer(newState, action);
newState = updateStateFromOptionsReducer(newState, action);
return combinedReducer(newState, action);
};

Expand Down
8 changes: 4 additions & 4 deletions src/selectors/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {

const getSizeWarningFlag = (state) => state.flags.sizewarning;
const getVisibleSidebar = (state) => state.visible.sidebar;
const getDisplayGlobalToolbar = (state) => state.display.globalToolbar;
const getDisplayGlobalNavigation = (state) => state.display.globalNavigation;
const getDisplaySidebar = (state) => state.display.sidebar;
const getVisibleCode = (state) => state.visible.code;
const getIgnoreLargeWarning = (state) => state.ignoreLargeWarning;
Expand Down Expand Up @@ -78,15 +78,15 @@ export const getChartSize = createSelector(
getVisibleCode,
getChartSizeState,
getDisplaySidebar,
getDisplayGlobalToolbar,
getDisplayGlobalNavigation,
],
(
visibleSidebar,
visibleMetaSidebar,
visibleCodeSidebar,
chartSize,
displaySidebar,
displayGlobalToolbar
displayGlobalNavigation
) => {
const { left, top, width, height } = chartSize;
if (!width || !height) {
Expand All @@ -98,7 +98,7 @@ export const getChartSize = createSelector(

// Get the actual sidebar width
const sidebarWidthActual =
displaySidebar || displayGlobalToolbar
displaySidebar || displayGlobalNavigation
? getSidebarWidth(isSidebarVisible, sidebarWidth)
: 0;

Expand Down

0 comments on commit 38f5258

Please sign in to comment.