dev env
parent
e391eb8eb3
commit
ae0a37df1a
|
@ -5,26 +5,11 @@
|
|||
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<meta name="theme-color" content="#000000" />
|
||||
<meta
|
||||
name="description"
|
||||
content="Web site created using create-react-app"
|
||||
/>
|
||||
<meta name="description" content="Dashboard for ZeitAdler" />
|
||||
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
|
||||
<!--
|
||||
manifest.json provides metadata used when your web app is installed on a
|
||||
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
|
||||
-->
|
||||
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
|
||||
<!--
|
||||
Notice the use of %PUBLIC_URL% in the tags above.
|
||||
It will be replaced with the URL of the `public` folder during the build.
|
||||
Only files inside the `public` folder can be referenced from the HTML.
|
||||
|
||||
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
|
||||
work correctly both with client-side routing and a non-root public URL.
|
||||
Learn how to configure a non-root public URL by running `npm run build`.
|
||||
-->
|
||||
<title>Dashboard</title>
|
||||
<title>Dashboard - ZeitAdler</title>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||
|
|
|
@ -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 }) {
|
|||
}
|
||||
/>
|
||||
|
||||
<Route
|
||||
path={Constants.ROUTE_PATHS.SUPPORT}
|
||||
element={
|
||||
<MySupsenseFallback>
|
||||
<PageInDevelopment />
|
||||
</MySupsenseFallback>
|
||||
}
|
||||
/>
|
||||
{isDevelopmentEnv() && (
|
||||
<>
|
||||
<Route
|
||||
path={Constants.ROUTE_PATHS.SUPPORT}
|
||||
element={
|
||||
<MySupsenseFallback>
|
||||
<PageInDevelopment />
|
||||
</MySupsenseFallback>
|
||||
}
|
||||
/>
|
||||
|
||||
<Route
|
||||
path={Constants.ROUTE_PATHS.FEEDBACK}
|
||||
element={
|
||||
<MySupsenseFallback>
|
||||
<PageInDevelopment />
|
||||
</MySupsenseFallback>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path={Constants.ROUTE_PATHS.FEEDBACK}
|
||||
element={
|
||||
<MySupsenseFallback>
|
||||
<PageInDevelopment />
|
||||
</MySupsenseFallback>
|
||||
}
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
|
||||
<Route
|
||||
path={Constants.ROUTE_PATHS.USER_PROFILE}
|
||||
|
|
|
@ -16,7 +16,7 @@ import {
|
|||
import { Divider, Menu } from "antd";
|
||||
import { useEffect, useState } from "react";
|
||||
import { useLocation, useNavigate } from "react-router-dom";
|
||||
import { BreakpointLgWidth, Constants } from "../../utils";
|
||||
import { BreakpointLgWidth, Constants, isDevelopmentEnv } from "../../utils";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { useSideBarContext } from "../../Contexts/SideBarContext";
|
||||
import { useStoresContext } from "../../Contexts/StoresContext";
|
||||
|
@ -132,7 +132,10 @@ export function SideMenuContent({
|
|||
});
|
||||
}
|
||||
|
||||
if (sideBarContext.permissions.includes("website")) {
|
||||
if (
|
||||
isDevelopmentEnv() &&
|
||||
sideBarContext.permissions.includes("website")
|
||||
) {
|
||||
groupStore.children.push({
|
||||
label: t("sideMenu.store.website.title"),
|
||||
icon: <EditOutlined />,
|
||||
|
@ -151,23 +154,26 @@ export function SideMenuContent({
|
|||
const getSecondMenuItems = () => {
|
||||
let items = [];
|
||||
|
||||
items.push(
|
||||
{
|
||||
label: t("sideMenu.support"),
|
||||
icon: <QuestionCircleOutlined />,
|
||||
key: Constants.ROUTE_PATHS.SUPPORT,
|
||||
},
|
||||
{
|
||||
label: t("sideMenu.feedback"),
|
||||
icon: <MessageOutlined />,
|
||||
key: Constants.ROUTE_PATHS.FEEDBACK,
|
||||
},
|
||||
{
|
||||
label: sideBarContext.username,
|
||||
icon: <UserOutlined />,
|
||||
key: Constants.ROUTE_PATHS.USER_PROFILE,
|
||||
}
|
||||
);
|
||||
if (isDevelopmentEnv()) {
|
||||
items.push(
|
||||
{
|
||||
label: t("sideMenu.support"),
|
||||
icon: <QuestionCircleOutlined />,
|
||||
key: Constants.ROUTE_PATHS.SUPPORT,
|
||||
},
|
||||
{
|
||||
label: t("sideMenu.feedback"),
|
||||
icon: <MessageOutlined />,
|
||||
key: Constants.ROUTE_PATHS.FEEDBACK,
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
items.push({
|
||||
label: sideBarContext.username,
|
||||
icon: <UserOutlined />,
|
||||
key: Constants.ROUTE_PATHS.USER_PROFILE,
|
||||
});
|
||||
|
||||
return items;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue