mirror of
https://github.com/SomboChea/ui
synced 2026-01-17 16:45:49 +07:00
fix: added packageMeta type
This commit is contained in:
committed by
Griffithtp
parent
c0b0189cc6
commit
3c54b116c9
@@ -13,7 +13,7 @@ import { Heading, GithubLink, RepositoryListItem } from './styles';
|
||||
import git from './img/git.png';
|
||||
import { isURL } from '../../utils/url';
|
||||
|
||||
class Repository extends Component<any, any> {
|
||||
class Repository extends Component {
|
||||
public render(): ReactElement<HTMLElement> {
|
||||
return (
|
||||
<DetailContextConsumer>
|
||||
@@ -33,12 +33,7 @@ class Repository extends Component<any, any> {
|
||||
}
|
||||
|
||||
private renderRepository = packageMeta => {
|
||||
const {
|
||||
repository: {
|
||||
// @ts-ignore
|
||||
url,
|
||||
} = {},
|
||||
} = packageMeta.latest;
|
||||
const { repository: { url = null } = {} } = packageMeta.latest;
|
||||
|
||||
if (!url || isURL(url) === false) {
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user