From ed9aad30d81af28087fe3ca2048a28ecf35321aa Mon Sep 17 00:00:00 2001 From: semantics Date: Mon, 18 Dec 2023 18:01:40 +0500 Subject: [PATCH] =?UTF-8?q?=D0=BA=D0=B8=D0=B4=D0=B0=D0=B5=D1=82=20=D0=BE?= =?UTF-8?q?=D1=88=D0=B8=D0=B1=D0=BA=D1=83,=20=D0=B5=D1=81=D0=BB=D0=B8=20?= =?UTF-8?q?=D0=B2=20=D1=83=D1=80=D0=BE=D0=B2=D0=BD=D0=B5=20=D0=BD=D0=B5?= =?UTF-8?q?=D1=82=20=D0=B7=D0=B0=D0=B4=D0=B0=D0=BD=D0=B8=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapMenu/UIMapMenu/Level/Level.tsx | 19 +++++++++++++++---- frontend/src/styles/mapMenu.scss | 9 +++++++++ 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/frontend/src/components/mapMenu/UIMapMenu/Level/Level.tsx b/frontend/src/components/mapMenu/UIMapMenu/Level/Level.tsx index 9cb5480..b988446 100644 --- a/frontend/src/components/mapMenu/UIMapMenu/Level/Level.tsx +++ b/frontend/src/components/mapMenu/UIMapMenu/Level/Level.tsx @@ -26,14 +26,25 @@ const Level: React.FC = ({id, level}) => { setOpenModalWindow(!isOpenModalWindow) }, [isOpenModalWindow]) + const renderModal = () => { + if (level.task_units && level.theory_units) + return ( + level.task_units.length + level.theory_units.length !== 0 + ? } + /> + : Нет доступных заданий для этого уровня}/> + ) + } + return (
{isOpenModalWindow - ? } - /> + ? renderModal() : null}
diff --git a/frontend/src/styles/mapMenu.scss b/frontend/src/styles/mapMenu.scss index 55fd212..4b82022 100644 --- a/frontend/src/styles/mapMenu.scss +++ b/frontend/src/styles/mapMenu.scss @@ -189,3 +189,12 @@ border: 1px solid #F1F1F1; letter-spacing: 0; } + +.error-nolvl-modal-window { + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + font-size: 20px; + letter-spacing: 1px; +}