diff --git a/CHANGELOG.md b/CHANGELOG.md index c1b9b639d..87149c9c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ - TypeDoc will now prefer comments on variable declarations over signature comments, #2042. - Fixed double rendering of "Type Parameters" header, #2054. +- Fixed double rendering of "Hierarchy" header, #2053. - Removed unused `widgets.png` and `widgets@2x.png` files from generated assets folder. ## v0.23.14 (2022-09-03) diff --git a/src/lib/output/themes/default/partials/hierarchy.tsx b/src/lib/output/themes/default/partials/hierarchy.tsx index 47a3b11c7..e7f1b88c6 100644 --- a/src/lib/output/themes/default/partials/hierarchy.tsx +++ b/src/lib/output/themes/default/partials/hierarchy.tsx @@ -2,20 +2,26 @@ import type { DefaultThemeRenderContext } from "../DefaultThemeRenderContext"; import { JSX } from "../../../../utils"; import type { DeclarationHierarchy } from "../../../../models"; -export const hierarchy = (context: DefaultThemeRenderContext, props: DeclarationHierarchy | undefined) => ( - <> - {!!props && ( -
-

Hierarchy

- -
- )} - -); +export function hierarchy(context: DefaultThemeRenderContext, props: DeclarationHierarchy | undefined) { + if (!props) return; + + return ( +
+

Hierarchy

+ {hierarchyList(context, props)} +
+ ); +} + +function hierarchyList(context: DefaultThemeRenderContext, props: DeclarationHierarchy) { + return ( + + ); +}