From 1884f3baae340dba8cfbf5a841a41b0b64881554 Mon Sep 17 00:00:00 2001 From: Thomas Nordquist Date: Sun, 16 Jun 2019 19:25:50 +0200 Subject: [PATCH] Fix code style --- app/src/actions/ConnectionManager.ts | 4 +++- app/src/components/Sidebar/CodeDiff/ChartPreview.tsx | 4 ++-- app/src/components/Sidebar/PlotHistory.tsx | 1 - 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/src/actions/ConnectionManager.ts b/app/src/actions/ConnectionManager.ts index 9325072..7c9fd95 100644 --- a/app/src/actions/ConnectionManager.ts +++ b/app/src/actions/ConnectionManager.ts @@ -15,7 +15,9 @@ import * as path from 'path' import { ActionTypes, Action } from '../reducers/ConnectionManager' -type ConnectionDictionary = { [s: string]: ConnectionOptions } +interface ConnectionDictionary { + [s: string]: ConnectionOptions +} const storedConnectionsIdentifier: StorageIdentifier = { id: 'ConnectionManager_connections', } diff --git a/app/src/components/Sidebar/CodeDiff/ChartPreview.tsx b/app/src/components/Sidebar/CodeDiff/ChartPreview.tsx index f0f1243..bce0371 100644 --- a/app/src/components/Sidebar/CodeDiff/ChartPreview.tsx +++ b/app/src/components/Sidebar/CodeDiff/ChartPreview.tsx @@ -38,7 +38,7 @@ function ChartPreview(props: Props) { const hasEnoughDataToDisplayDiagrams = props.treeNode.messageHistory.count() > 1 - let preview = hasEnoughDataToDisplayDiagrams ? ( + const addChartToPanelButton = hasEnoughDataToDisplayDiagrams ? ( - {preview} + {addChartToPanelButton} diff --git a/app/src/components/Sidebar/PlotHistory.tsx b/app/src/components/Sidebar/PlotHistory.tsx index 3428f33..4889287 100644 --- a/app/src/components/Sidebar/PlotHistory.tsx +++ b/app/src/components/Sidebar/PlotHistory.tsx @@ -1,4 +1,3 @@ -import * as q from '../../../../backend/src/Model' import * as React from 'react' import DateFormatter from '../helper/DateFormatter' import { default as ReactResizeDetector } from 'react-resize-detector'