From 6151a35cd5aad2911f94c376475ef9c9f6864381 Mon Sep 17 00:00:00 2001 From: Roderick Hsiao Date: Thu, 26 Dec 2024 11:54:22 -0800 Subject: [PATCH] fix: formatting --- src/lib/handleViewport.tsx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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);