added filter for repos

This commit is contained in:
Florian Scholdei
2019-04-10 17:25:36 +02:00
parent 99e78da67b
commit 3008aaaa4d
3 changed files with 18 additions and 10 deletions

View File

@@ -36,7 +36,7 @@ type Props = {
// dispatched functions
fetchRepos: string => void,
fetchReposByPage: (string, number) => void,
fetchReposByPage: (link: string, page: number, filter?: string) => void,
fetchReposByLink: string => void,
// context props
@@ -71,6 +71,9 @@ class Overview extends React.Component<Props> {
subtitle={t("overview.subtitle")}
loading={loading}
error={error}
filter={filter => {
this.props.fetchReposByPage(this.props.reposLink, this.props.page, filter);
}}
>
{this.renderList()}
{this.renderPageActionCreateButton()}
@@ -151,8 +154,8 @@ const mapDispatchToProps = dispatch => {
fetchRepos: (link: string) => {
dispatch(fetchRepos(link));
},
fetchReposByPage: (link: string, page: number) => {
dispatch(fetchReposByPage(link, page));
fetchReposByPage: (link: string, page: number, filter?: string) => {
dispatch(fetchReposByPage(link, page, filter));
},
fetchReposByLink: (link: string) => {
dispatch(fetchReposByLink(link));