remove duplicate code and add comment to wrapper component (#3076)

* remove duplicate code and add comment to wrapper component:

* use react hooks recommended settings
This commit is contained in:
Tessa Thornton
2020-08-10 12:30:25 -04:00
committed by GitHub
parent 88a77f8712
commit adc508c7dc
3 changed files with 2 additions and 6 deletions
@@ -44,10 +44,6 @@ const SpinnerWhileRendering: FunctionComponent<Props> = (props) => {
// Ensure window has bee
return callWhenReallyIdle(() => setHidden(false));
}, [setHidden]);
// In our tests, we don't actually "render", so just skip this.
if (process.env.NODE_ENV === "test") {
return <>{props.children}</>;
}
return (
<>
{hidden && (
@@ -7,6 +7,7 @@ interface Props {
}
const SpinnerWhileRenderingWrapper: FunctionComponent<Props> = (props) => {
// In our tests, we don't actually "render", so just skip this.
if (process.env.NODE_ENV === "test") {
return <>{props.children}</>;
}