Skip to content

Commit

Permalink
xchem#11 fix creating of init snapshot after creating project
Browse files Browse the repository at this point in the history
  • Loading branch information
tibor-postek-m2ms committed Apr 17, 2020
1 parent c96d2bb commit 88ed7e6
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 0 additions & 2 deletions js/components/preview/redux/dispatchActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,6 @@ export const resetReducersBetweenSnapshots = (stages = []) => dispatch => {
dispatch(removeAllNglComponents(stage.stage));
}
});
// dispatch(resetCurrentCompoundsSettings(true));
// dispatch(resetProjectsReducer());

dispatch(resetLoadedSnapshots());
dispatch(resetSelectionState());
Expand Down
2 changes: 1 addition & 1 deletion js/components/snapshot/modals/newSnapshotForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export const NewSnapshotForm = memo(({ handleCloseModal }) => {
</Grid>
<Grid item>
<Button color="primary" onClick={submitForm} loading={isLoadingSnapshotDialog}>
Save snapshot
Save
</Button>
</Grid>
</Grid>
Expand Down
4 changes: 3 additions & 1 deletion js/components/snapshot/redux/dispatchActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,9 @@ export const createNewSnapshot = ({ title, description, type, author, parent, se
]);
// redirect to project with newest created snapshot /:projectID/:snapshotID
if (response.data.id && session_project) {
history.push(`${URLS.projects}${session_project}/${response.data.id}`);
// Really bad usage or redirection. Hint for everybody in this line ignore it, but in other parts of code
// use react-router !
window.location.replace(`${URLS.projects}${session_project}/${response.data.id}`);
}
});
})
Expand Down
2 changes: 1 addition & 1 deletion js/components/snapshot/withSnapshotManagement.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const withSnapshotManagement = WrappedComponent => {
startIcon={<Save />}
// disabled={disableButtons}
>
Save Snapshot
Save
</Button>,
<DownloadPdb key="download" />
]);
Expand Down

0 comments on commit 88ed7e6

Please sign in to comment.