dev env
parent
e391eb8eb3
commit
ae0a37df1a
|
@ -5,26 +5,11 @@
|
||||||
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
|
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
<meta name="theme-color" content="#000000" />
|
<meta name="theme-color" content="#000000" />
|
||||||
<meta
|
<meta name="description" content="Dashboard for ZeitAdler" />
|
||||||
name="description"
|
|
||||||
content="Web site created using create-react-app"
|
|
||||||
/>
|
|
||||||
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
|
<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" />
|
<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
|
<title>Dashboard - ZeitAdler</title>
|
||||||
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>
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { Route, Routes } from "react-router-dom";
|
import { Route, Routes } from "react-router-dom";
|
||||||
import { Constants } from "../../utils";
|
import { Constants, isDevelopmentEnv } from "../../utils";
|
||||||
import { lazy } from "react";
|
import { lazy } from "react";
|
||||||
import { MySupsenseFallback } from "../MySupsenseFallback";
|
import { MySupsenseFallback } from "../MySupsenseFallback";
|
||||||
|
|
||||||
|
@ -85,23 +85,27 @@ export default function AppRoutes({ userSession, setUserSession }) {
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Route
|
{isDevelopmentEnv() && (
|
||||||
path={Constants.ROUTE_PATHS.SUPPORT}
|
<>
|
||||||
element={
|
<Route
|
||||||
<MySupsenseFallback>
|
path={Constants.ROUTE_PATHS.SUPPORT}
|
||||||
<PageInDevelopment />
|
element={
|
||||||
</MySupsenseFallback>
|
<MySupsenseFallback>
|
||||||
}
|
<PageInDevelopment />
|
||||||
/>
|
</MySupsenseFallback>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
<Route
|
<Route
|
||||||
path={Constants.ROUTE_PATHS.FEEDBACK}
|
path={Constants.ROUTE_PATHS.FEEDBACK}
|
||||||
element={
|
element={
|
||||||
<MySupsenseFallback>
|
<MySupsenseFallback>
|
||||||
<PageInDevelopment />
|
<PageInDevelopment />
|
||||||
</MySupsenseFallback>
|
</MySupsenseFallback>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
|
||||||
<Route
|
<Route
|
||||||
path={Constants.ROUTE_PATHS.USER_PROFILE}
|
path={Constants.ROUTE_PATHS.USER_PROFILE}
|
||||||
|
|
|
@ -16,7 +16,7 @@ import {
|
||||||
import { Divider, Menu } from "antd";
|
import { Divider, Menu } from "antd";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { useLocation, useNavigate } from "react-router-dom";
|
import { useLocation, useNavigate } from "react-router-dom";
|
||||||
import { BreakpointLgWidth, Constants } from "../../utils";
|
import { BreakpointLgWidth, Constants, isDevelopmentEnv } from "../../utils";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { useSideBarContext } from "../../Contexts/SideBarContext";
|
import { useSideBarContext } from "../../Contexts/SideBarContext";
|
||||||
import { useStoresContext } from "../../Contexts/StoresContext";
|
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({
|
groupStore.children.push({
|
||||||
label: t("sideMenu.store.website.title"),
|
label: t("sideMenu.store.website.title"),
|
||||||
icon: <EditOutlined />,
|
icon: <EditOutlined />,
|
||||||
|
@ -151,23 +154,26 @@ export function SideMenuContent({
|
||||||
const getSecondMenuItems = () => {
|
const getSecondMenuItems = () => {
|
||||||
let items = [];
|
let items = [];
|
||||||
|
|
||||||
items.push(
|
if (isDevelopmentEnv()) {
|
||||||
{
|
items.push(
|
||||||
label: t("sideMenu.support"),
|
{
|
||||||
icon: <QuestionCircleOutlined />,
|
label: t("sideMenu.support"),
|
||||||
key: Constants.ROUTE_PATHS.SUPPORT,
|
icon: <QuestionCircleOutlined />,
|
||||||
},
|
key: Constants.ROUTE_PATHS.SUPPORT,
|
||||||
{
|
},
|
||||||
label: t("sideMenu.feedback"),
|
{
|
||||||
icon: <MessageOutlined />,
|
label: t("sideMenu.feedback"),
|
||||||
key: Constants.ROUTE_PATHS.FEEDBACK,
|
icon: <MessageOutlined />,
|
||||||
},
|
key: Constants.ROUTE_PATHS.FEEDBACK,
|
||||||
{
|
}
|
||||||
label: sideBarContext.username,
|
);
|
||||||
icon: <UserOutlined />,
|
}
|
||||||
key: Constants.ROUTE_PATHS.USER_PROFILE,
|
|
||||||
}
|
items.push({
|
||||||
);
|
label: sideBarContext.username,
|
||||||
|
icon: <UserOutlined />,
|
||||||
|
key: Constants.ROUTE_PATHS.USER_PROFILE,
|
||||||
|
});
|
||||||
|
|
||||||
return items;
|
return items;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue