mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-12 16:35:45 +01:00
replaced type any with string
This commit is contained in:
@@ -7,7 +7,7 @@ import { Button } from "./buttons";
|
||||
type Props = {
|
||||
collection: PagedCollection,
|
||||
page: number,
|
||||
filter?: any,
|
||||
filter?: string,
|
||||
|
||||
// context props
|
||||
t: string => string
|
||||
|
||||
@@ -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<Props> {
|
||||
|
||||
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) => {
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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<Props> {
|
||||
|
||||
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) => {
|
||||
|
||||
@@ -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)}`
|
||||
|
||||
@@ -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<Props> {
|
||||
|
||||
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) => {
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user