diff --git a/src/lib/handleViewport.tsx b/src/lib/handleViewport.tsx index 9377b33..f995e39 100644 --- a/src/lib/handleViewport.tsx +++ b/src/lib/handleViewport.tsx @@ -18,7 +18,7 @@ function handleViewport< >( TargetComponent: ComponentType>, options: Options = defaultOptions, - config: Config = defaultConfig + config: Config = defaultConfig, ) { const ForwardedRefComponent = forwardRef((props, ref) => { const refProps = { @@ -54,10 +54,9 @@ function handleViewport< return ; }; - const name = - (TargetComponent as React.FC).displayName || - (TargetComponent as React.FC).name || - 'Component'; + const name = (TargetComponent as React.FC).displayName + || (TargetComponent as React.FC).name + || 'Component'; InViewport.displayName = `handleViewport(${name})`; return hoistNonReactStatic(InViewport, ForwardedRefComponent);