File tree Expand file tree Collapse file tree 1 file changed +8
-10
lines changed
apps/website/src/components/model/method Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import type {
5
5
ApiMethodSignature ,
6
6
} from '@microsoft/api-extractor-model' ;
7
7
import dynamic from 'next/dynamic' ;
8
+ import { Fragment } from 'react' ;
8
9
import { MethodDocumentation } from './MethodDocumentation' ;
9
10
import { MethodHeader } from './MethodHeader' ;
10
11
@@ -20,17 +21,14 @@ export function Method({
20
21
if ( method . getMergedSiblings ( ) . length > 1 ) {
21
22
// We have overloads, use the overload switcher, but render
22
23
// each overload node on the server.
23
- const overloads = method
24
- . getMergedSiblings ( )
25
- . map ( ( sibling , idx ) => (
26
- < MethodDocumentation key = { `${ sibling . displayName } -${ idx } ` } method = { sibling as ApiMethod | ApiMethodSignature } />
27
- ) ) ;
24
+ const overloads = method . getMergedSiblings ( ) . map ( ( sibling , idx ) => (
25
+ < Fragment key = { `${ sibling . displayName } -${ idx } ` } >
26
+ < MethodHeader method = { sibling as ApiMethod | ApiMethodSignature } />
27
+ < MethodDocumentation method = { sibling as ApiMethod | ApiMethodSignature } />
28
+ </ Fragment >
29
+ ) ) ;
28
30
29
- return (
30
- < OverloadSwitcher overloads = { overloads } >
31
- < MethodHeader method = { method } />
32
- </ OverloadSwitcher >
33
- ) ;
31
+ return < OverloadSwitcher overloads = { overloads } /> ;
34
32
}
35
33
36
34
// We have just a single method, render it on the server.
You can’t perform that action at this time.
0 commit comments