From ae0a37df1acf87e261a00cd7e14bda595aa23041 Mon Sep 17 00:00:00 2001 From: alex Date: Wed, 24 Jan 2024 18:55:53 +0100 Subject: [PATCH] dev env --- public/index.html | 19 ++----------- src/Components/AppRoutes/index.js | 38 ++++++++++++++------------ src/Components/SideMenu/index.js | 44 ++++++++++++++++++------------- 3 files changed, 48 insertions(+), 53 deletions(-) diff --git a/public/index.html b/public/index.html index 7564c7a..3c13771 100644 --- a/public/index.html +++ b/public/index.html @@ -5,26 +5,11 @@ - + - - - Dashboard + Dashboard - ZeitAdler diff --git a/src/Components/AppRoutes/index.js b/src/Components/AppRoutes/index.js index 625e700..882cace 100644 --- a/src/Components/AppRoutes/index.js +++ b/src/Components/AppRoutes/index.js @@ -1,5 +1,5 @@ import { Route, Routes } from "react-router-dom"; -import { Constants } from "../../utils"; +import { Constants, isDevelopmentEnv } from "../../utils"; import { lazy } from "react"; import { MySupsenseFallback } from "../MySupsenseFallback"; @@ -85,23 +85,27 @@ export default function AppRoutes({ userSession, setUserSession }) { } /> - - - - } - /> + {isDevelopmentEnv() && ( + <> + + + + } + /> - - - - } - /> + + + + } + /> + + )} , @@ -151,23 +154,26 @@ export function SideMenuContent({ const getSecondMenuItems = () => { let items = []; - items.push( - { - label: t("sideMenu.support"), - icon: , - key: Constants.ROUTE_PATHS.SUPPORT, - }, - { - label: t("sideMenu.feedback"), - icon: , - key: Constants.ROUTE_PATHS.FEEDBACK, - }, - { - label: sideBarContext.username, - icon: , - key: Constants.ROUTE_PATHS.USER_PROFILE, - } - ); + if (isDevelopmentEnv()) { + items.push( + { + label: t("sideMenu.support"), + icon: , + key: Constants.ROUTE_PATHS.SUPPORT, + }, + { + label: t("sideMenu.feedback"), + icon: , + key: Constants.ROUTE_PATHS.FEEDBACK, + } + ); + } + + items.push({ + label: sideBarContext.username, + icon: , + key: Constants.ROUTE_PATHS.USER_PROFILE, + }); return items; };