1
0
mirror of https://github.com/SomboChea/ui synced 2026-01-17 16:45:49 +07:00

fix: @typescript-eslint/no-explicit-any

This commit is contained in:
Griffithtp
2019-06-24 23:54:32 +01:00
parent 31c11f2b5b
commit 2f28ade710
16 changed files with 74 additions and 44 deletions

View File

@@ -11,8 +11,11 @@ import { isEmail } from '../../utils/url';
interface Props {
type: 'contributors' | 'maintainers';
}
interface State {
visibleDevs: number;
}
class Developers extends Component<Props, any> {
class Developers extends Component<Props, State> {
public state = {
visibleDevs: 6,
};
@@ -20,9 +23,9 @@ class Developers extends Component<Props, any> {
public render(): JSX.Element {
return (
<DetailContextConsumer>
{({ packageMeta }: any) => {
{({ packageMeta }) => {
const { type } = this.props;
const developerType = packageMeta.latest[type];
const developerType = packageMeta && packageMeta.latest[type];
if (!developerType || developerType.length === 0) return null;
return this.renderDevelopers(developerType, packageMeta);
}}