diff --git a/src/components/ClientsGraph.js b/src/components/ClientsGraph.js index 55b279d..a5eafb7 100644 --- a/src/components/ClientsGraph.js +++ b/src/components/ClientsGraph.js @@ -134,27 +134,23 @@ class ClientsGraph extends Component { }; return ( -
-
-
-
- {t("Clients Over Last 24 Hours")} -
-
- -
- { - this.state.loading - ? -
- -
- : - null - } -
+
+
+ {t("Clients Over Last 24 Hours")}
+
+ +
+ { + this.state.loading + ? +
+ +
+ : + null + } { // Now you're thinking with portals! ReactDOM.createPortal( diff --git a/src/components/QueriesGraph.js b/src/components/QueriesGraph.js index 739395b..10382d3 100644 --- a/src/components/QueriesGraph.js +++ b/src/components/QueriesGraph.js @@ -136,27 +136,23 @@ class QueriesGraph extends Component { }; return ( -
-
-
-
- {t("Queries Over Last 24 Hours")} -
-
- -
- { - this.state.loading - ? -
- -
- : - null - } -
+
+
+ {t("Queries Over Last 24 Hours")}
+
+ +
+ { + this.state.loading + ? +
+ +
+ : + null + }
); } diff --git a/src/components/SummaryStats.js b/src/components/SummaryStats.js index bd0a180..1d3faf6 100644 --- a/src/components/SummaryStats.js +++ b/src/components/SummaryStats.js @@ -8,7 +8,7 @@ * This file is copyright under the latest version of the EUPL. * Please see LICENSE file for your rights under this license. */ -import React, { Component } from 'react'; +import React, { Component, Fragment } from 'react'; import { translate } from 'react-i18next'; import { api, makeCancelable } from '../utils'; @@ -61,7 +61,7 @@ class SummaryStats extends Component { const { t } = this.props; return ( -
+
@@ -102,7 +102,7 @@ class SummaryStats extends Component {
-
+ ); } } diff --git a/src/components/TopBlocked.js b/src/components/TopBlocked.js index cd6131f..8a1caa0 100644 --- a/src/components/TopBlocked.js +++ b/src/components/TopBlocked.js @@ -93,26 +93,24 @@ class TopBlocked extends Component { const { t } = this.props; return ( -
-
-
- {t("Top Blocked Domains")} -
-
-
- {this.generateTable(t)} -
-
- { - this.state.loading - ? -
- -
- : - null - } +
+
+ {t("Top Blocked Domains")}
+
+
+ {this.generateTable(t)} +
+
+ { + this.state.loading + ? +
+ +
+ : + null + }
); } diff --git a/src/components/TopClients.js b/src/components/TopClients.js index 99e093f..e0b4819 100644 --- a/src/components/TopClients.js +++ b/src/components/TopClients.js @@ -94,26 +94,24 @@ class TopClients extends Component { const { t } = this.props; return ( -
-
-
- {t("Top Clients")} -
-
-
- {this.generateTable(t)} -
-
- { - this.state.loading - ? -
- -
- : - null - } +
+
+ {t("Top Clients")}
+
+
+ {this.generateTable(t)} +
+
+ { + this.state.loading + ? +
+ +
+ : + null + }
); } diff --git a/src/components/TopDomains.js b/src/components/TopDomains.js index 0850829..6b6ce53 100644 --- a/src/components/TopDomains.js +++ b/src/components/TopDomains.js @@ -95,26 +95,24 @@ class TopDomains extends Component { const { t } = this.props; return ( -
-
-
- {t("Top Permitted Domains")} -
-
-
- {this.generateTable(t)} -
-
- { - this.state.loading - ? -
- -
- : - null - } +
+
+ {t("Top Permitted Domains")}
+
+
+ {this.generateTable(t)} +
+
+ { + this.state.loading + ? +
+ +
+ : + null + }
); } diff --git a/src/views/Dashboard.js b/src/views/Dashboard.js index 7bb144f..d1bddba 100644 --- a/src/views/Dashboard.js +++ b/src/views/Dashboard.js @@ -19,16 +19,32 @@ import { api } from "../utils"; export default () => (
- - +
+ +
+
+
+ +
+
{ api.loggedIn ? -
- - - +
+ +
+
+
+
+ +
+
+ +
+
+ +
: null