1
0
mirror of https://github.com/SomboChea/ui synced 2024-12-28 23:24:26 +07:00

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

This commit is contained in:
Griffithtp 2019-06-29 09:03:41 +01:00
parent a0f0c80e2e
commit ec8ed1214b

View File

@ -1,5 +1,5 @@
import React, { Component, Fragment, ReactElement } from 'react';
import { withRouter, RouteProps } from 'react-router-dom';
import { withRouter, RouteComponentProps } from 'react-router-dom';
import CardContent from '@material-ui/core/CardContent';
import { DetailContextConsumer, VersionPageConsumerProps } from '../../pages/version/Version';
@ -7,18 +7,18 @@ import { DetailContextConsumer, VersionPageConsumerProps } from '../../pages/ver
import { CardWrap, Heading, Tags, Tag } from './styles';
import NoItems from '../NoItems';
interface DepDetailProps {
type DepDetailProps = {
name: string;
version: string;
onLoading: () => void;
history: string[];
}
onLoading?: () => void;
} & RouteComponentProps;
interface DepDetailState {
name: string;
version: string;
}
class DepDetail extends Component<DepDetailProps & RouteProps, DepDetailState> {
class DepDetail extends Component<DepDetailProps, DepDetailState> {
constructor(props: DepDetailProps) {
super(props);
const { name, version } = this.props;
@ -39,12 +39,12 @@ class DepDetail extends Component<DepDetailProps & RouteProps, DepDetailState> {
const { name } = this.state;
const { onLoading, history } = this.props;
onLoading();
onLoading && onLoading();
history.push(`/-/web/detail/${name}`);
};
}
const WrapperDependencyDetail = withRouter<any>(DepDetail);
const WrapperDependencyDetail = withRouter(DepDetail);
class DependencyBlock extends Component<{ title: string; dependencies: [] }> {
public render(): ReactElement<HTMLElement> {