formatting

This commit is contained in:
Ryan Vazquez
2020-10-28 12:28:38 -04:00
parent bf3bce32be
commit ec884c9d28
6 changed files with 19 additions and 19 deletions
@@ -34,7 +34,12 @@ import {
UnlabeledDataflowAlert,
UnlabeledDataflowData,
} from '../types';
import { DEFAULT_DATE_FORMAT, Duration, exclusiveEndDateOf, inclusiveStartDateOf } from '../utils/duration';
import {
DEFAULT_DATE_FORMAT,
Duration,
exclusiveEndDateOf,
inclusiveStartDateOf,
} from '../utils/duration';
type IntervalFields = {
duration: Duration;
@@ -38,10 +38,10 @@ const MockContext = ({
currency: Currency;
engineerCost: number;
}>) => (
<MockConfigProvider engineerCost={engineerCost}>
<MockCurrencyProvider currency={currency}>{children}</MockCurrencyProvider>
</MockConfigProvider>
);
<MockConfigProvider engineerCost={engineerCost}>
<MockCurrencyProvider currency={currency}>{children}</MockCurrencyProvider>
</MockConfigProvider>
);
describe.each`
engineerCost | ratio | amount | expected
@@ -66,10 +66,10 @@ export const CostInsightsNavigation = ({
})}
</Badge>
) : (
React.cloneElement(item.icon, {
className: classes.navigationIcon,
})
)
React.cloneElement(item.icon, {
className: classes.navigationIcon,
})
)
}
title={item.title}
/>
@@ -41,13 +41,7 @@ import {
useLastCompleteBillingDate,
useLoading,
} from '../../hooks';
import {
Alert,
Cost,
Maybe,
MetricData,
Project,
} from '../../types';
import { Alert, Cost, Maybe, MetricData, Project } from '../../types';
import { mapLoadingToProps } from './selector';
import { ProjectSelect } from '../ProjectSelect';
import { intervalsOf } from '../../utils/duration';
@@ -32,8 +32,9 @@ export const ProjectGrowthAlertCard = ({ alert }: ProjectGrowthAlertProps) => {
const [costStart, costEnd] = alert.aggregation;
const subheader = `
${alert.products.length} ${pluralOf(alert.products.length, 'product')}${alert.products.length > 1 ? ', sorted by cost' : ''
}`;
${alert.products.length} ${pluralOf(alert.products.length, 'product')}${
alert.products.length > 1 ? ', sorted by cost' : ''
}`;
const previousName = moment(alert.periodStart, 'YYYY-[Q]Q').format(
'[Q]Q YYYY',
);
@@ -68,7 +68,7 @@ export const LoadingProvider = ({ children }: PropsWithChildren<{}>) => {
// Initial page loading is handled by progress bar
setBackdropVisible(
!state[DefaultLoadingAction.CostInsightsInitial] &&
Object.values(state).some(l => l),
Object.values(state).some(l => l),
);
}
displayLoadingBackdrop();