0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2025-01-27 22:59:51 -05:00

chore: fix flow errors

This commit is contained in:
Juan Picado @jotadeveloper 2019-01-21 19:38:11 +01:00
parent 8c06f968f9
commit 9820c460e8
No known key found for this signature in database
GPG key ID: 18AC54485952D158
3 changed files with 16 additions and 9 deletions

View file

@ -7,7 +7,7 @@
import React, { Component, Fragment } from 'react'; import React, { Component, Fragment } from 'react';
import { withRouter } from 'react-router-dom'; import { withRouter } from 'react-router-dom';
import CardContent from '@material-ui/core/CardContent'; import CardContent from '@material-ui/core/CardContent/index';
import { DetailContextConsumer } from '../../pages/version'; import { DetailContextConsumer } from '../../pages/version';
import { Content, CardWrap, Heading, Tags, Tag } from './styles'; import { Content, CardWrap, Heading, Tags, Tag } from './styles';
@ -41,7 +41,7 @@ class DepDetail extends Component<any, any> {
const WrappDepDetail = withRouter(DepDetail); const WrappDepDetail = withRouter(DepDetail);
class DependencyBlock extends Component<any, any> { class DependencyBlock extends Component<any, any> {
renderTags = (deps: object, enableLoading: boolean) => renderTags = (deps: any, enableLoading: any) =>
deps.map(dep => { deps.map(dep => {
const [name, version] = dep; const [name, version] = dep;

View file

@ -4,9 +4,9 @@
*/ */
import styled from 'react-emotion'; import styled from 'react-emotion';
import Card from '@material-ui/core/Card'; import Card from '@material-ui/core/Card/index';
import Typography from '@material-ui/core/Typography'; import Typography from '@material-ui/core/Typography/index';
import Chip from '@material-ui/core/Chip'; import Chip from '@material-ui/core/Chip/index';
export const Content = styled.div` export const Content = styled.div`
&& { && {

View file

@ -6,13 +6,20 @@
import { DetailContextConsumer } from '../../pages/version/index'; import { DetailContextConsumer } from '../../pages/version/index';
import { formatDateDistance } from '../../utils/package'; import { formatDateDistance } from '../../utils/package';
import { Heading, Spacer, ListItemText } from './styles'; import { Heading, Spacer, ListItemText } from './styles';
import List from '@material-ui/core/List'; import List from '@material-ui/core/List/index';
import ListItem from '@material-ui/core/ListItem'; import ListItem from '@material-ui/core/ListItem/index';
import React from 'react'; import React from 'react';
class UpLinks extends React.PureComponent { class UpLinks extends React.PureComponent<any> {
render() { render() {
return <DetailContextConsumer>{({ packageMeta }) => this.renderContent(packageMeta._uplinks)}</DetailContextConsumer>; return (
// $FlowFixMe
<DetailContextConsumer>
{({ packageMeta }) => {
return this.renderContent(packageMeta._uplinks);
}}
</DetailContextConsumer>
);
} }
renderUpLinksList = (uplinks: object) => ( renderUpLinksList = (uplinks: object) => (