Skip to content

Commit

Permalink
Merge branch 'main' into typing-various-improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Arnei committed Feb 11, 2025
2 parents adf7995 + 75ddd63 commit 8158031
Show file tree
Hide file tree
Showing 104 changed files with 1,102 additions and 1,497 deletions.
95 changes: 48 additions & 47 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
"homepage": "/admin-ui",
"dependencies": {
"@hello-pangea/dnd": "^17.0.0",
"@mui/material": "^6.4.1",
"@mui/x-date-pickers": "^7.24.1",
"@mui/material": "^6.4.2",
"@mui/x-date-pickers": "^7.25.0",
"@reduxjs/toolkit": "^2.5.1",
"array-move": "^4.0.0",
"axios": "^1.7.9",
"bourbon": "^7.3.0",
"classnames": "^2.5.1",
"date-fns": "^3.6.0",
"dompurify": "^3.2.3",
"dompurify": "^3.2.4",
"font-awesome": "^4.7.0",
"formik": "^2.4.6",
"http-proxy-middleware": "^3.0.3",
Expand All @@ -32,7 +32,7 @@
"react-i18next": "^15.4.0",
"react-icons": "^5.4.0",
"react-redux": "^9.2.0",
"react-router": "^7.1.3",
"react-router": "^7.1.5",
"react-select": "^5.10.0",
"redux": "^5.0.1",
"redux-persist": "^6.0.0",
Expand Down Expand Up @@ -65,7 +65,7 @@
"@eslint/js": "^9.19.0",
"@redux-devtools/extension": "^3.3.0",
"@types/lodash": "^4.17.15",
"@types/node": "^22.12.0",
"@types/node": "^22.13.0",
"@types/react-dom": "^18.3.0",
"@types/uuid": "^10.0.0",
"@typescript-eslint/eslint-plugin": "^7.14.1",
Expand Down
34 changes: 20 additions & 14 deletions src/components/About.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,19 @@ import React, { useEffect, useState } from "react";
import Header from "./Header";
import NavBar from "./NavBar";
import Footer from "./Footer";
import MainNav from "./shared/MainNav";
import { useTranslation } from "react-i18next";
import { Link, useLocation } from "react-router";
import cn from "classnames";
import { useLocation } from "react-router";
import axios from 'axios';
import i18n from "../i18n/i18n";
import DOMPurify from "dompurify";

const About: React.FC = () => {
const About = () => {
const { t } = useTranslation();
const location = useLocation();

const [displayNavigation, setNavigation] = useState(false);
const [aboutContent, setAboutContent] = useState<string>("");

const toggleNavigation = () => {
setNavigation(!displayNavigation);
};

useEffect(() => {
const getURL = (language: string) => {
return `/ui/config/admin-ui/${location.pathname.split("/").pop()}.${language}.html`;
Expand All @@ -46,12 +40,24 @@ const About: React.FC = () => {
return (
<span>
<Header />
<NavBar>
<MainNav isOpen={displayNavigation} toggleMenu={toggleNavigation} />
<nav>
<Link to="/about/imprint" className={cn({ active: location.pathname === "/about/imprint" })} onClick={() => { }}>{t("ABOUT.IMPRINT")}</Link>
<Link to="/about/privacy" className={cn({ active: location.pathname === "/about/privacy" })} onClick={() => { }}>{t("ABOUT.PRIVACY")}</Link>
</nav>
<NavBar
displayNavigation={displayNavigation}
setNavigation={setNavigation}
links={[
{
path: "/about/imprint",
accessRole: "ROLE_UI_USERS_VIEW",
loadFn: () => { },
text: "ABOUT.IMPRINT"
},
{
path: "/about/privacy",
accessRole: "ROLE_UI_GROUPS_VIEW",
loadFn: () => { },
text: "ABOUT.PRIVACY"
},
]}
>
</NavBar>
<div className="about">
<div dangerouslySetInnerHTML={{ __html: DOMPurify.sanitize(aboutContent) }} ></div>
Expand Down
Loading

0 comments on commit 8158031

Please sign in to comment.