From 6d5d0df1c020d31da65793f5c2ed7d32585f992f Mon Sep 17 00:00:00 2001 From: Daniel Gasienica Date: Sun, 15 Apr 2018 02:53:19 -0400 Subject: [PATCH] :art: Fix TSLint errors --- ts/components/Lightbox.tsx | 4 ++-- .../media-gallery/AttachmentSection.tsx | 22 +++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/ts/components/Lightbox.tsx b/ts/components/Lightbox.tsx index d1612e2c5..708793d5e 100644 --- a/ts/components/Lightbox.tsx +++ b/ts/components/Lightbox.tsx @@ -57,14 +57,14 @@ const IconButton = ({ onClick, type }: IconButtonProps) => ( ); export class Lightbox extends React.Component { - private containerRef: HTMLDivElement | null = null; - public static defaultProps: Partial = { shouldShowNextButton: false, shouldShowPreviousButton: false, shouldShowSaveAsButton: false, }; + private containerRef: HTMLDivElement | null = null; + public componentDidMount() { const useCapture = true; document.addEventListener('keyup', this.onKeyUp, useCapture); diff --git a/ts/components/conversation/media-gallery/AttachmentSection.tsx b/ts/components/conversation/media-gallery/AttachmentSection.tsx index 989bdba5c..3b25d0019 100644 --- a/ts/components/conversation/media-gallery/AttachmentSection.tsx +++ b/ts/components/conversation/media-gallery/AttachmentSection.tsx @@ -36,6 +36,17 @@ interface Props { } export class AttachmentSection extends React.Component { + public render() { + const { header } = this.props; + + return ( +
+

{header}

+
{this.renderItems()}
+
+ ); + } + private renderItems() { const { i18n, messages, type } = this.props; @@ -78,15 +89,4 @@ export class AttachmentSection extends React.Component { onItemClick({ message }); }; - - public render() { - const { header } = this.props; - - return ( -
-

{header}

-
{this.renderItems()}
-
- ); - } }