env files
parent
8ff7b13fb7
commit
faba61a3bc
|
@ -0,0 +1,2 @@
|
|||
REACT_APP_IDENTITY_AUTHENTICATION_URL=https://toodle.ddns.net/identity-server-api/identity/authenticate?UserName={username}&Password={password}
|
||||
REACT_APP_ENABLE_TEMPLATE_CONTENT=True
|
|
@ -0,0 +1,3 @@
|
|||
PUBLIC_URL=/cdn-admin/
|
||||
REACT_APP_IDENTITY_AUTHENTICATION_URL=https://toodle.ddns.net/identity-server-api/identity/authenticate?UserName={username}&Password={password}
|
||||
REACT_APP_ENABLE_TEMPLATE_CONTENT=False
|
|
@ -16,7 +16,7 @@ export default function App() {
|
|||
var { isAuthenticated } = useUserState();
|
||||
|
||||
return (
|
||||
<HashRouter>
|
||||
<HashRouter basename={process.env.PUBLIC_URL || ""}>
|
||||
<Switch>
|
||||
<Route exact path="/" render={() => <Redirect to="/app/dashboard" />} />
|
||||
<Route
|
||||
|
@ -31,8 +31,6 @@ export default function App() {
|
|||
</HashRouter>
|
||||
);
|
||||
|
||||
// #######################################################################
|
||||
|
||||
function PrivateRoute({ component, ...rest }) {
|
||||
return (
|
||||
<Route
|
||||
|
|
|
@ -14,7 +14,7 @@ import {
|
|||
} from "@material-ui/icons";
|
||||
import Dot from "./components/Dot";
|
||||
|
||||
const menu = [
|
||||
let menu = [
|
||||
{
|
||||
id: 0,
|
||||
label: "Dashboard",
|
||||
|
@ -75,7 +75,14 @@ const menu = [
|
|||
label: "FAQ",
|
||||
link: "https://toodle.ddns.net/forum",
|
||||
icon: <FAQIcon />
|
||||
},
|
||||
}
|
||||
];
|
||||
|
||||
const enableTemplateContent =
|
||||
process.env.REACT_APP_ENABLE_TEMPLATE_CONTENT === "True";
|
||||
|
||||
if (enableTemplateContent) {
|
||||
menu.push(
|
||||
{ id: 12, type: "divider" },
|
||||
{
|
||||
id: 13,
|
||||
|
@ -119,6 +126,7 @@ const menu = [
|
|||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
);
|
||||
}
|
||||
|
||||
export default menu;
|
||||
|
|
Loading…
Reference in New Issue