Skip to content

Commit

Permalink
remove unnecessary changes
Browse files Browse the repository at this point in the history
  • Loading branch information
shahzad31 committed Jun 26, 2020
1 parent f12173b commit b1573bd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ export const BreakdownSeries: FC<Props> = ({
percentileRange,
onLoadingChange,
}) => {
const { data, loading } = useBreakdowns({
const { data, status } = useBreakdowns({
field,
value,
percentileRange,
});

useEffect(() => {
onLoadingChange(loading);
}, [loading, onLoadingChange]);
onLoadingChange(status !== 'success');
}, [status, onLoadingChange]);

return (
<>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const useBreakdowns = ({ percentileRange, field, value }: Props) => {

const { min: minP, max: maxP } = percentileRange ?? {};

const { data, status } = useFetcher(
return useFetcher(
(callApmApi) => {
if (start && end && field && value) {
return callApmApi({
Expand All @@ -45,5 +45,4 @@ export const useBreakdowns = ({ percentileRange, field, value }: Props) => {
},
[end, start, uiFilters, field, value, minP, maxP]
);
return { data, loading: status !== 'success' };
};

0 comments on commit b1573bd

Please sign in to comment.