diff --git a/src/components/MainView.jsx b/src/components/MainView.jsx
index 5cb6bee..c58bd82 100644
--- a/src/components/MainView.jsx
+++ b/src/components/MainView.jsx
@@ -20,6 +20,7 @@ import { isAdmin } from "../utils/SecurityUtils";
import Messages from "./message/Messages";
import Footer from "../Footer";
import PropTypes from "prop-types";
+import { ANALYTICS_URL } from "../../config/index.js";
class MainView extends React.Component {
constructor(props) {
@@ -61,6 +62,26 @@ class MainView extends React.Component {
}
}
+ _renderStatisticsNavLink(path) {
+ return (
+ <>
+ {ANALYTICS_URL === "" ? (
+ path.startsWith(Routes.statistics.path)}
+ to={Routes.statistics.path}
+ >
+ {this.i18n("statistics.panel-title")}
+
+ ) : (
+
+ {this.i18n("statistics.panel-title")}
+
+ )}
+ >
+ );
+ }
+
render() {
if (this.props.status === ACTION_STATUS.PENDING) {
return ;
@@ -120,15 +141,7 @@ class MainView extends React.Component {
-
- path.startsWith(Routes.statistics.path)}
- to={Routes.statistics.path}
- >
- {this.i18n("statistics.panel-title")}
-
-
+ {this._renderStatisticsNavLink(path)}