Skip to content

Commit

Permalink
fix: rendering a spinner based on fetching causes flash
Browse files Browse the repository at this point in the history
  • Loading branch information
jenniferarnesen committed Dec 21, 2023
1 parent 913eb40 commit 988b700
Showing 1 changed file with 3 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,9 @@ export const InterpretationsUnit = forwardRef(
const showNoTimeDimensionHelpText =
type === 'eventVisualization' && !visualizationHasTimeDimension

const { data, loading, fetching, refetch } = useDataQuery(
interpretationsQuery,
{
lazy: true,
}
)
const { data, loading, refetch } = useDataQuery(interpretationsQuery, {
lazy: true,
})

const onCompleteAction = useCallback(() => {
refetch({ type, id })
Expand All @@ -87,11 +84,6 @@ export const InterpretationsUnit = forwardRef(
expanded: isExpanded,
})}
>
{fetching && !loading && (
<div className="fetching-loader">
<CircularLoader small />
</div>
)}
<div
className="header"
onClick={() => setIsExpanded(!isExpanded)}
Expand Down

0 comments on commit 988b700

Please sign in to comment.