Skip to content

Commit 6151a35

Browse files
committed
fix: formatting
1 parent 14f15ef commit 6151a35

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/lib/handleViewport.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ function handleViewport<
1818
>(
1919
TargetComponent: ComponentType<PropsWithoutRef<TProps>>,
2020
options: Options = defaultOptions,
21-
config: Config = defaultConfig
21+
config: Config = defaultConfig,
2222
) {
2323
const ForwardedRefComponent = forwardRef<TElement, TProps>((props, ref) => {
2424
const refProps = {
@@ -54,10 +54,9 @@ function handleViewport<
5454
return <ForwardedRefComponent {...props} ref={node} />;
5555
};
5656

57-
const name =
58-
(TargetComponent as React.FC).displayName ||
59-
(TargetComponent as React.FC).name ||
60-
'Component';
57+
const name = (TargetComponent as React.FC).displayName
58+
|| (TargetComponent as React.FC).name
59+
|| 'Component';
6160
InViewport.displayName = `handleViewport(${name})`;
6261

6362
return hoistNonReactStatic(InViewport, ForwardedRefComponent);

0 commit comments

Comments
 (0)