From 83edce141011c7a0447799aca5e3ea33799999d6 Mon Sep 17 00:00:00 2001 From: Florian Scholdei Date: Wed, 17 Apr 2019 16:42:27 +0200 Subject: [PATCH] replaced type any with string --- .../packages/ui-components/src/LinkPaginator.js | 2 +- scm-ui/src/groups/containers/Groups.js | 6 +++--- scm-ui/src/groups/modules/groups.js | 2 +- scm-ui/src/repos/containers/Overview.js | 6 +++--- scm-ui/src/repos/modules/repos.js | 2 +- scm-ui/src/users/containers/Users.js | 6 +++--- scm-ui/src/users/modules/users.js | 2 +- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/scm-ui-components/packages/ui-components/src/LinkPaginator.js b/scm-ui-components/packages/ui-components/src/LinkPaginator.js index 900107f4c1..51dc75f03c 100644 --- a/scm-ui-components/packages/ui-components/src/LinkPaginator.js +++ b/scm-ui-components/packages/ui-components/src/LinkPaginator.js @@ -7,7 +7,7 @@ import { Button } from "./buttons"; type Props = { collection: PagedCollection, page: number, - filter?: any, + filter?: string, // context props t: string => string diff --git a/scm-ui/src/groups/containers/Groups.js b/scm-ui/src/groups/containers/Groups.js index d8f2945ef5..d4fa58e0c9 100644 --- a/scm-ui/src/groups/containers/Groups.js +++ b/scm-ui/src/groups/containers/Groups.js @@ -45,7 +45,7 @@ type Props = { location: any, // dispatch functions - fetchGroupsByPage: (link: string, page: number, filter?: any) => void, + fetchGroupsByPage: (link: string, page: number, filter?: string) => void, fetchGroupsByLink: (link: string) => void }; @@ -155,7 +155,7 @@ class Groups extends React.Component { getQueryString = () => { const { location } = this.props; - return location.search ? queryString.parse(location.search).q : null; + return location.search ? queryString.parse(location.search).q : undefined; }; } @@ -182,7 +182,7 @@ const mapStateToProps = (state, ownProps) => { const mapDispatchToProps = dispatch => { return { - fetchGroupsByPage: (link: string, page: number, filter?: any) => { + fetchGroupsByPage: (link: string, page: number, filter?: string) => { dispatch(fetchGroupsByPage(link, page, filter)); }, fetchGroupsByLink: (link: string) => { diff --git a/scm-ui/src/groups/modules/groups.js b/scm-ui/src/groups/modules/groups.js index 17d34f9335..cb3c24aa0f 100644 --- a/scm-ui/src/groups/modules/groups.js +++ b/scm-ui/src/groups/modules/groups.js @@ -40,7 +40,7 @@ export function fetchGroups(link: string) { return fetchGroupsByLink(link); } -export function fetchGroupsByPage(link: string, page: number, filter?: any) { +export function fetchGroupsByPage(link: string, page: number, filter?: string) { // backend start counting by 0 if (filter) { return fetchGroupsByLink( diff --git a/scm-ui/src/repos/containers/Overview.js b/scm-ui/src/repos/containers/Overview.js index 0b39ee367a..4b0b7ed9b3 100644 --- a/scm-ui/src/repos/containers/Overview.js +++ b/scm-ui/src/repos/containers/Overview.js @@ -46,7 +46,7 @@ type Props = { // dispatched functions fetchRepos: string => void, - fetchReposByPage: (link: string, page: number, filter?: any) => void, + fetchReposByPage: (link: string, page: number, filter?: string) => void, fetchReposByLink: string => void }; @@ -164,7 +164,7 @@ class Overview extends React.Component { getQueryString = () => { const { location } = this.props; - return location.search ? queryString.parse(location.search).q : null; + return location.search ? queryString.parse(location.search).q : undefined; }; } @@ -191,7 +191,7 @@ const mapDispatchToProps = dispatch => { fetchRepos: (link: string) => { dispatch(fetchRepos(link)); }, - fetchReposByPage: (link: string, page: number, filter?: any) => { + fetchReposByPage: (link: string, page: number, filter?: string) => { dispatch(fetchReposByPage(link, page, filter)); }, fetchReposByLink: (link: string) => { diff --git a/scm-ui/src/repos/modules/repos.js b/scm-ui/src/repos/modules/repos.js index 0ce2113e15..cd48f89fea 100644 --- a/scm-ui/src/repos/modules/repos.js +++ b/scm-ui/src/repos/modules/repos.js @@ -46,7 +46,7 @@ export function fetchRepos(link: string) { return fetchReposByLink(link); } -export function fetchReposByPage(link: string, page: number, filter?: any) { +export function fetchReposByPage(link: string, page: number, filter?: string) { if (filter) { return fetchReposByLink( `${link}?page=${page - 1}&q=${decodeURIComponent(filter)}` diff --git a/scm-ui/src/users/containers/Users.js b/scm-ui/src/users/containers/Users.js index 0316a1ee5f..5a2bc3b5f5 100644 --- a/scm-ui/src/users/containers/Users.js +++ b/scm-ui/src/users/containers/Users.js @@ -45,7 +45,7 @@ type Props = { location: any, // dispatch functions - fetchUsersByPage: (link: string, page: number, filter?: any) => void, + fetchUsersByPage: (link: string, page: number, filter?: string) => void, fetchUsersByLink: (link: string) => void }; @@ -157,7 +157,7 @@ class Users extends React.Component { getQueryString = () => { const { location } = this.props; - return location.search ? queryString.parse(location.search).q : null; + return location.search ? queryString.parse(location.search).q : undefined; }; } @@ -184,7 +184,7 @@ const mapStateToProps = (state, ownProps) => { const mapDispatchToProps = dispatch => { return { - fetchUsersByPage: (link: string, page: number, filter?: any) => { + fetchUsersByPage: (link: string, page: number, filter?: string) => { dispatch(fetchUsersByPage(link, page, filter)); }, fetchUsersByLink: (link: string) => { diff --git a/scm-ui/src/users/modules/users.js b/scm-ui/src/users/modules/users.js index c9b3571b02..c83a4d9b94 100644 --- a/scm-ui/src/users/modules/users.js +++ b/scm-ui/src/users/modules/users.js @@ -43,7 +43,7 @@ export function fetchUsers(link: string) { return fetchUsersByLink(link); } -export function fetchUsersByPage(link: string, page: number, filter?: any) { +export function fetchUsersByPage(link: string, page: number, filter?: string) { // backend start counting by 0 if (filter) { return fetchUsersByLink(