Small doc fixes: remove duplicate types and add function array

This commit is contained in:
Fabio Berger
2018-03-20 15:28:25 +00:00
parent 4ca706d4e6
commit ec582d6e46
3 changed files with 7 additions and 2 deletions

View File

@@ -116,6 +116,7 @@ export const doxityUtils = {
methods, methods,
properties, properties,
types: [], types: [],
functions: [],
events, events,
}; };
docAgnosticFormat[contractName] = docSection; docAgnosticFormat[contractName] = docSection;

View File

@@ -170,7 +170,11 @@ export const typeDocUtils = {
sectionName, sectionName,
docsInfo.id, docsInfo.id,
); );
docSection.types.push(customType); const seenTypeNames = _.map(docSection.types, t => t.name);
const isUnseen = !_.includes(seenTypeNames, customType.name);
if (isUnseen) {
docSection.types.push(customType);
}
} }
break; break;

View File

@@ -122,7 +122,7 @@ export class NestedSidebarMenu extends React.Component<NestedSidebarMenuProps, N
const name = `${menuItemName}-${entityName}`; const name = `${menuItemName}-${entityName}`;
const id = utils.getIdFromName(name); const id = utils.getIdFromName(name);
return ( return (
<li key={`menuItem-${entityName}`}> <li key={`menuSubsectionItem-${name}`}>
<ScrollLink <ScrollLink
to={id} to={id}
offset={0} offset={0}