From b9af35ee758dfb27fa3950d94d38b9ca045d2625 Mon Sep 17 00:00:00 2001 From: Kentai Radiquum Date: Sun, 21 Apr 2024 21:10:08 +0500 Subject: [PATCH] frontend: add loginNeeded component --- .../app/components/LogInNeeded/LogInNeeded.jsx | 15 +++++++++++++++ frontend/app/globals.css | 3 ++- frontend/app/history/page.js | 10 ++++++++++ 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 frontend/app/components/LogInNeeded/LogInNeeded.jsx create mode 100644 frontend/app/history/page.js diff --git a/frontend/app/components/LogInNeeded/LogInNeeded.jsx b/frontend/app/components/LogInNeeded/LogInNeeded.jsx new file mode 100644 index 0000000..495fe4f --- /dev/null +++ b/frontend/app/components/LogInNeeded/LogInNeeded.jsx @@ -0,0 +1,15 @@ +"use client"; + +import Link from "next/link"; + +export const LogInNeeded = (props) => { + return ( +
+ no_accounts +
Требуется авторизация
+

+ Для доступа к этой вкладке требуется авторизация в аккаунте anixart +

+
+ ); +}; diff --git a/frontend/app/globals.css b/frontend/app/globals.css index f55e9e5..5316c95 100644 --- a/frontend/app/globals.css +++ b/frontend/app/globals.css @@ -17,7 +17,8 @@ body { } } */ -body, nav.left{ +body, nav.left, main{ transition: background .2s; transform-origin: left; + min-height: 100dvh; } diff --git a/frontend/app/history/page.js b/frontend/app/history/page.js new file mode 100644 index 0000000..c53359d --- /dev/null +++ b/frontend/app/history/page.js @@ -0,0 +1,10 @@ +"use client"; + +import { LogInNeeded } from "@/app/components/LogInNeeded/LogInNeeded"; +import { useUserStore } from "@/app/store/user-store"; + +export default History = () => { + const userStore = useUserStore(); + + return <>{!userStore.isAuth ? : ""}; +};