From 994baf9b1cdd90c581c9f956c44cd34b51e83b8b Mon Sep 17 00:00:00 2001 From: alex Date: Fri, 26 Jan 2024 19:40:38 +0100 Subject: [PATCH] loading screen --- public/locales/de/translation.json | 3 ++ public/locales/en/translation.json | 3 ++ src/App.css | 6 --- src/App.js | 71 +++++++++++++++++++----------- src/Pages/UserProfile/index.js | 2 + src/index.css | 33 -------------- src/index.js | 25 ++--------- 7 files changed, 58 insertions(+), 85 deletions(-) diff --git a/public/locales/de/translation.json b/public/locales/de/translation.json index c826373..323fcdb 100644 --- a/public/locales/de/translation.json +++ b/public/locales/de/translation.json @@ -70,6 +70,9 @@ } } }, + "app": { + "loading": "Lade Profil..." + }, "pageNotFound": { "title": "Seite nicht gefunden", "subTitle": "Die Seite, die Sie besucht haben, existiert leider nicht.", diff --git a/public/locales/en/translation.json b/public/locales/en/translation.json index c288c66..0ff08b9 100644 --- a/public/locales/en/translation.json +++ b/public/locales/en/translation.json @@ -70,6 +70,9 @@ } } }, + "app": { + "loading": "Loading profile..." + }, "pageNotFound": { "title": "Page Not Found", "subTitle": "The page you visited does not exist.", diff --git a/src/App.css b/src/App.css index b5860cb..6c3915e 100644 --- a/src/App.css +++ b/src/App.css @@ -14,9 +14,3 @@ content: unset; } } - -@media (min-width: 576px) { - .res { - display: none; - } -} diff --git a/src/App.js b/src/App.js index 34f2e12..e452d4b 100644 --- a/src/App.js +++ b/src/App.js @@ -1,7 +1,7 @@ import "antd/dist/reset.css"; import "./App.css"; import Login from "./Pages/Login"; -import { Layout, Spin } from "antd"; +import { Layout, Space, Spin, Typography } from "antd"; import { Constants, UseUserSession, myFetch } from "./utils"; import DashboardLayout from "./Components/DashboardLayout"; import SideBarProvider from "./Contexts/SideBarContext"; @@ -13,6 +13,50 @@ import { useEffect, useState } from "react"; import StoresProvider from "./Contexts/StoresContext"; import { clarity } from "react-microsoft-clarity"; import { useTranslation } from "react-i18next"; +import { ReactComponent as ZeitAdler } from "./ZeitAdler.svg"; + +export function Loading() { + const { t } = useTranslation(); + + return ( +
+ + +
+ + + + {t("app.loading")} + +
+
+ ); +} export default function App() { /*const [notificationApi, notificationContextHolder] = @@ -54,30 +98,7 @@ export default function App() { } if (appUserData === null) { - return ( -
- - - - Lade Daten... - -
- ); + return ; } console.info( diff --git a/src/Pages/UserProfile/index.js b/src/Pages/UserProfile/index.js index 8a715b2..39e1687 100644 --- a/src/Pages/UserProfile/index.js +++ b/src/Pages/UserProfile/index.js @@ -17,6 +17,7 @@ import { RequestState, RequestStateItem, } from "../../Components/MyRequestStateItem"; +import { LogoutOutlined } from "@ant-design/icons"; export default function UserProfile({ setUserSession }) { const { t, i18n } = useTranslation(); @@ -98,6 +99,7 @@ export default function UserProfile({ setUserSession }) {