mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-12 00:15:44 +01:00
replaced type any with string
This commit is contained in:
@@ -7,7 +7,7 @@ import { Button } from "./buttons";
|
|||||||
type Props = {
|
type Props = {
|
||||||
collection: PagedCollection,
|
collection: PagedCollection,
|
||||||
page: number,
|
page: number,
|
||||||
filter?: any,
|
filter?: string,
|
||||||
|
|
||||||
// context props
|
// context props
|
||||||
t: string => string
|
t: string => string
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ type Props = {
|
|||||||
location: any,
|
location: any,
|
||||||
|
|
||||||
// dispatch functions
|
// dispatch functions
|
||||||
fetchGroupsByPage: (link: string, page: number, filter?: any) => void,
|
fetchGroupsByPage: (link: string, page: number, filter?: string) => void,
|
||||||
fetchGroupsByLink: (link: string) => void
|
fetchGroupsByLink: (link: string) => void
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -155,7 +155,7 @@ class Groups extends React.Component<Props> {
|
|||||||
|
|
||||||
getQueryString = () => {
|
getQueryString = () => {
|
||||||
const { location } = this.props;
|
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 => {
|
const mapDispatchToProps = dispatch => {
|
||||||
return {
|
return {
|
||||||
fetchGroupsByPage: (link: string, page: number, filter?: any) => {
|
fetchGroupsByPage: (link: string, page: number, filter?: string) => {
|
||||||
dispatch(fetchGroupsByPage(link, page, filter));
|
dispatch(fetchGroupsByPage(link, page, filter));
|
||||||
},
|
},
|
||||||
fetchGroupsByLink: (link: string) => {
|
fetchGroupsByLink: (link: string) => {
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ export function fetchGroups(link: string) {
|
|||||||
return fetchGroupsByLink(link);
|
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
|
// backend start counting by 0
|
||||||
if (filter) {
|
if (filter) {
|
||||||
return fetchGroupsByLink(
|
return fetchGroupsByLink(
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ type Props = {
|
|||||||
|
|
||||||
// dispatched functions
|
// dispatched functions
|
||||||
fetchRepos: string => void,
|
fetchRepos: string => void,
|
||||||
fetchReposByPage: (link: string, page: number, filter?: any) => void,
|
fetchReposByPage: (link: string, page: number, filter?: string) => void,
|
||||||
fetchReposByLink: string => void
|
fetchReposByLink: string => void
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -164,7 +164,7 @@ class Overview extends React.Component<Props> {
|
|||||||
|
|
||||||
getQueryString = () => {
|
getQueryString = () => {
|
||||||
const { location } = this.props;
|
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) => {
|
fetchRepos: (link: string) => {
|
||||||
dispatch(fetchRepos(link));
|
dispatch(fetchRepos(link));
|
||||||
},
|
},
|
||||||
fetchReposByPage: (link: string, page: number, filter?: any) => {
|
fetchReposByPage: (link: string, page: number, filter?: string) => {
|
||||||
dispatch(fetchReposByPage(link, page, filter));
|
dispatch(fetchReposByPage(link, page, filter));
|
||||||
},
|
},
|
||||||
fetchReposByLink: (link: string) => {
|
fetchReposByLink: (link: string) => {
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ export function fetchRepos(link: string) {
|
|||||||
return fetchReposByLink(link);
|
return fetchReposByLink(link);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function fetchReposByPage(link: string, page: number, filter?: any) {
|
export function fetchReposByPage(link: string, page: number, filter?: string) {
|
||||||
if (filter) {
|
if (filter) {
|
||||||
return fetchReposByLink(
|
return fetchReposByLink(
|
||||||
`${link}?page=${page - 1}&q=${decodeURIComponent(filter)}`
|
`${link}?page=${page - 1}&q=${decodeURIComponent(filter)}`
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ type Props = {
|
|||||||
location: any,
|
location: any,
|
||||||
|
|
||||||
// dispatch functions
|
// dispatch functions
|
||||||
fetchUsersByPage: (link: string, page: number, filter?: any) => void,
|
fetchUsersByPage: (link: string, page: number, filter?: string) => void,
|
||||||
fetchUsersByLink: (link: string) => void
|
fetchUsersByLink: (link: string) => void
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -157,7 +157,7 @@ class Users extends React.Component<Props> {
|
|||||||
|
|
||||||
getQueryString = () => {
|
getQueryString = () => {
|
||||||
const { location } = this.props;
|
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 => {
|
const mapDispatchToProps = dispatch => {
|
||||||
return {
|
return {
|
||||||
fetchUsersByPage: (link: string, page: number, filter?: any) => {
|
fetchUsersByPage: (link: string, page: number, filter?: string) => {
|
||||||
dispatch(fetchUsersByPage(link, page, filter));
|
dispatch(fetchUsersByPage(link, page, filter));
|
||||||
},
|
},
|
||||||
fetchUsersByLink: (link: string) => {
|
fetchUsersByLink: (link: string) => {
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ export function fetchUsers(link: string) {
|
|||||||
return fetchUsersByLink(link);
|
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
|
// backend start counting by 0
|
||||||
if (filter) {
|
if (filter) {
|
||||||
return fetchUsersByLink(
|
return fetchUsersByLink(
|
||||||
|
|||||||
Reference in New Issue
Block a user