Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions __tests__/src/reducers/windows.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,7 @@ describe('windows reducer', () => {
},
};
const action = {
collectionPath: [],
type: ActionTypes.HIDE_COLLECTION_DIALOG,
windowId: 'abc123',
};
Expand Down
2 changes: 1 addition & 1 deletion src/components/CollectionDialog.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export function CollectionDialog({

/** */
const hideDialog = () => {
hideCollectionDialog(windowId);
hideCollectionDialog([...collectionPath, manifestId], windowId);
};

/** */
Expand Down
2 changes: 1 addition & 1 deletion src/containers/CollectionInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { CollectionInfo } from '../components/CollectionInfo';
* @memberof WindowSideBarInfoPanel
* @private
*/
const mapStateToProps = (state, { companionWindowId, windowId }) => {
const mapStateToProps = (state, { windowId }) => {
const { collectionPath } = (getWindow(state, { windowId }) || {});
const manifestId = collectionPath[collectionPath.length - 1];

Expand Down
3 changes: 2 additions & 1 deletion src/state/actions/window.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,9 @@
}

/** */
export function hideCollectionDialog(windowId) {
export function hideCollectionDialog(collectionPath = [], windowId) {
return {
collectionPath,

Check warning on line 208 in src/state/actions/window.js

View check run for this annotation

Codecov / codecov/patch

src/state/actions/window.js#L208

Added line #L208 was not covered by tests
type: ActionTypes.HIDE_COLLECTION_DIALOG,
windowId,
};
Expand Down
1 change: 1 addition & 0 deletions src/state/reducers/windows.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ export const windowsReducer = (state = {}, action) => {
[action.windowId]: {
...state[action.windowId],
collectionDialogOn: false,
collectionPath: action.collectionPath,
},
};
default:
Expand Down