Fixes linting issues

This commit is contained in:
Alex Corey
2019-11-04 15:16:21 -05:00
parent 9170aa184a
commit b570c8ad2a
2 changed files with 8 additions and 5 deletions

View File

@@ -1,4 +1,4 @@
import React, { Fragment } from 'react'; import React from 'react';
import { node, bool } from 'prop-types'; import { node, bool } from 'prop-types';
import { TextListItem, TextListItemVariants } from '@patternfly/react-core'; import { TextListItem, TextListItemVariants } from '@patternfly/react-core';
import styled from 'styled-components'; import styled from 'styled-components';
@@ -25,14 +25,18 @@ const DetailValue = styled(({ fullWidth, ...props }) => (
`} `}
`; `;
const Detail = ({ label, value, fullWidth, className}) => { const Detail = ({ label, value, fullWidth, className }) => {
if (!value && typeof value !== 'number') { if (!value && typeof value !== 'number') {
return null; return null;
} }
return ( return (
<> <>
<DetailName className={className} component={TextListItemVariants.dt} fullWidth={fullWidth}> <DetailName
className={className}
component={TextListItemVariants.dt}
fullWidth={fullWidth}
>
{label} {label}
</DetailName> </DetailName>
<DetailValue <DetailValue

View File

@@ -164,8 +164,7 @@ class JobTemplateDetail extends Component {
); );
const renderMissingDataDetail = value => ( const renderMissingDataDetail = value => (
<MissingDetail label={value} value={i18n._(t`Deleted`)} />
<MissingDetail label={value} value={i18n._(t`Deleted`)} />
); );
const inventoryValue = (kind, id) => { const inventoryValue = (kind, id) => {