eschutho commented on a change in pull request #13676:
URL: https://github.com/apache/superset/pull/13676#discussion_r599177397



##########
File path: superset-frontend/src/SqlLab/components/SouthPane.tsx
##########
@@ -157,55 +155,52 @@ export class SouthPane extends React.PureComponent {
           query={query}
           visualize={false}
           csv={false}
-          actions={props.actions}
+          actions={actions}
           cache
           height={innerTabContentHeight}
-          displayLimit={this.props.displayLimit}
+          displayLimit={displayLimit}
         />
       </Tabs.TabPane>
     ));
-
-    return (
-      <StyledPane className="SouthPane" ref={this.southPaneRef}>
-        <Tabs
-          activeKey={this.props.activeSouthPaneTab}
-          className="SouthPaneTabs"
-          onChange={this.switchTab}
-          id={shortid.generate()}
-          fullWidth={false}
-        >
-          <Tabs.TabPane tab={t('Results')} key="Results">
-            {results}
-          </Tabs.TabPane>
-          <Tabs.TabPane tab={t('Query history')} key="History">
-            <QueryHistory
-              queries={props.editorQueries}
-              actions={props.actions}
-              displayLimit={props.displayLimit}
-            />
-          </Tabs.TabPane>
-          {dataPreviewTabs}
-        </Tabs>
-      </StyledPane>
-    );
-  }
+  return offline ? (
+    renderOfflineStatus()
+  ) : (
+    <StyledPane className="SouthPane" ref={southPaneRef}>
+      <Tabs
+        activeKey={activeSouthPaneTab}
+        className="SouthPaneTabs"
+        onChange={switchTab}
+        id={shortid.generate()}
+        fullWidth={false}
+      >
+        <Tabs.TabPane tab={t('Results')} key="Results">
+          {renderResults()}
+        </Tabs.TabPane>
+        <Tabs.TabPane tab={t('Query history')} key="History">
+          <QueryHistory
+            queries={editorQueries}
+            actions={actions}
+            displayLimit={displayLimit}
+          />
+        </Tabs.TabPane>
+        {renderDataPreviewTabs()}
+      </Tabs>
+    </StyledPane>
+  );
 }
 
-function mapStateToProps({ sqlLab }) {
+function mapStateToProps({ sqlLab }: Record<string, any>) {
   return {
     activeSouthPaneTab: sqlLab.activeSouthPaneTab,
     databases: sqlLab.databases,
     offline: sqlLab.offline,
   };
 }
 
-function mapDispatchToProps(dispatch) {
+function mapDispatchToProps(dispatch: Dispatch) {
   return {
-    actions: bindActionCreators(Actions, dispatch),
+    actions: bindActionCreators<any, any>(Actions, dispatch),

Review comment:
       do you want to move the map state and dispatch to a new hooks file like 
the one that you created 
`superset-frontend/src/views/CRUD/data/database/state.ts`?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to