File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -71,6 +71,9 @@ const relatedReferences = [
7171 ... relatedReferencesFromEntryData ,
7272 ... relatedEntries ,
7373].slice (0 , 4 );
74+
75+ const seenParams: Record <string , true > = {};
76+
7477---
7578
7679<Head title ={ entry .data .title } locale ={ currentLocale } />
@@ -134,15 +137,19 @@ const relatedReferences = [
134137 ))}
135138 { entry .data .overloads &&
136139 entry .data .overloads .map ((overload : ReferenceOverload ) =>
137- overload .params .map ((param : ReferenceParam ) => (
138- <div class = " grid grid-cols-6 gap-[40px] text-body" >
139- <h4 class = " col-span-1" >{ param .name } </h4 >
140- <span
141- class = " col-span-5 [&_p]:m-0 [&_a]:underline"
142- set :html = { param .description }
143- />
144- </div >
145- ))
140+ overload .params .map ((param : ReferenceParam ) => {
141+ if (seenParams [param .name ]) return <></>;
142+ seenParams [param .name ] = true ;
143+ return (
144+ <div class = " grid grid-cols-6 gap-[40px] text-body" >
145+ <h4 class = " col-span-1" >{ param .name } </h4 >
146+ <span
147+ class = " col-span-5 [&_p]:m-0 [&_a]:underline"
148+ set :html = { param .description }
149+ />
150+ </div >
151+ )
152+ })
146153 )}
147154 </div >
148155 </>
You can’t perform that action at this time.
0 commit comments