From 0253c5d76d0ddd83a82f4b28d584ad1056e1b9e6 Mon Sep 17 00:00:00 2001 From: Roman Hotsiy Date: Wed, 10 Jan 2018 19:20:35 +0200 Subject: [PATCH] fix: undo section id + some minor fixes --- src/components/ContentItems/ContentItems.tsx | 5 ++--- src/components/Operation/Operation.tsx | 5 ++--- src/components/Redoc/Redoc.tsx | 4 ++++ src/components/SecuritySchemes/SecuritySchemes.tsx | 2 +- src/components/SideMenu/SideMenu.tsx | 2 +- src/services/MenuStore.ts | 4 +++- 6 files changed, 13 insertions(+), 9 deletions(-) diff --git a/src/components/ContentItems/ContentItems.tsx b/src/components/ContentItems/ContentItems.tsx index 80ea50b545..f71e6b6f7a 100644 --- a/src/components/ContentItems/ContentItems.tsx +++ b/src/components/ContentItems/ContentItems.tsx @@ -59,12 +59,11 @@ export class ContentItem extends React.Component { export class TagItem extends React.Component { render() { const { name, description } = this.props.item; - const hash = this.props.item.getHash(); return ( -

- +

+ {name}

{description !== undefined && } diff --git a/src/components/Operation/Operation.tsx b/src/components/Operation/Operation.tsx index 73463b567e..522a11a36b 100644 --- a/src/components/Operation/Operation.tsx +++ b/src/components/Operation/Operation.tsx @@ -44,12 +44,11 @@ export class Operation extends ComponentWithOptions { const { name: summary, description, deprecated } = operation; const pathInMiddle = this.options.pathInMiddlePanel; - const hash = operation.getHash(); return ( -

- +

+ {summary} {deprecated && Deprecated }

{pathInMiddle && } diff --git a/src/components/Redoc/Redoc.tsx b/src/components/Redoc/Redoc.tsx index 4808faeccd..3faeaf9a3c 100644 --- a/src/components/Redoc/Redoc.tsx +++ b/src/components/Redoc/Redoc.tsx @@ -25,6 +25,10 @@ export class Redoc extends React.Component { this.props.store.menu.updateOnHash(); } + componentWillUnmount() { + this.props.store.dispose(); + } + render() { const { store: { spec, menu, options } } = this.props; const store = this.props.store; diff --git a/src/components/SecuritySchemes/SecuritySchemes.tsx b/src/components/SecuritySchemes/SecuritySchemes.tsx index b98e96042e..0282a8c3de 100644 --- a/src/components/SecuritySchemes/SecuritySchemes.tsx +++ b/src/components/SecuritySchemes/SecuritySchemes.tsx @@ -82,7 +82,7 @@ export class SecurityDefs extends React.PureComponent {
{this.props.securitySchemes.schemes.map(scheme => (
-

+

{scheme.id}

diff --git a/src/components/SideMenu/SideMenu.tsx b/src/components/SideMenu/SideMenu.tsx index 5d0d3f5e35..67e3c5c9b9 100644 --- a/src/components/SideMenu/SideMenu.tsx +++ b/src/components/SideMenu/SideMenu.tsx @@ -16,7 +16,7 @@ export class SideMenu extends ComponentWithOptions<{ menu: MenuStore }> {