fetch changeset correct

This commit is contained in:
Maren Süwer
2018-09-25 14:11:18 +02:00
parent e3c7f50797
commit 5463796741
3 changed files with 11 additions and 11 deletions

View File

@@ -11,7 +11,6 @@ type Props = {
repository: Repository,
repositories: Repository[],
fetchChangesetIfNeeded: (
state: Object,
namespace: string,
repoName: string,
id: string
@@ -28,7 +27,7 @@ class ChangesetView extends React.Component<State, Props> {
const { fetchChangesetIfNeeded, repository } = this.props;
const id = this.props.match.params.id;
//state macht keinen Sinn?! repositories holen!
fetchChangesetIfNeeded(null, repository.namespace, repository.name, id);
fetchChangesetIfNeeded(repository.namespace, repository.name, id);
}
render() {
@@ -45,12 +44,11 @@ const mapStateToProps = (state, ownProps: Props) => {
const mapDispatchToProps = dispatch => {
return {
fetchChangesetIfNeeded: (
state: Object,
namespace: string,
repoName: string,
id: string
) => {
dispatch(fetchChangesetIfNeeded(state, namespace, repoName, id));
dispatch(fetchChangesetIfNeeded(namespace, repoName, id));
}
};
};