From cb1b94582a75a526e282528b7bb5f896aad0dfd4 Mon Sep 17 00:00:00 2001 From: Oleksandra Nedashkivska Date: Tue, 10 Sep 2024 09:42:19 +0300 Subject: [PATCH 1/2] OV-220: * wrap loader in overlay --- .../components/protected-route/protected-route.tsx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/frontend/src/bundles/common/components/protected-route/protected-route.tsx b/frontend/src/bundles/common/components/protected-route/protected-route.tsx index f47d6b46b..0bd929bee 100644 --- a/frontend/src/bundles/common/components/protected-route/protected-route.tsx +++ b/frontend/src/bundles/common/components/protected-route/protected-route.tsx @@ -1,4 +1,8 @@ -import { Loader, Navigate } from '~/bundles/common/components/components.js'; +import { + Loader, + Navigate, + Overlay, +} from '~/bundles/common/components/components.js'; import { AppRoute, DataStatus } from '~/bundles/common/enums/enums.js'; import { useAppSelector } from '~/bundles/common/hooks/hooks.js'; @@ -10,7 +14,11 @@ const ProtectedRoute: React.FC = ({ children }) => { const { user, dataStatus } = useAppSelector((state) => state.auth); if (dataStatus === DataStatus.PENDING) { - return ; + return ( + + + + ); } if (dataStatus === DataStatus.REJECTED) { From ca3dd8b320fa193db348f351ca3df40a464ddb14 Mon Sep 17 00:00:00 2001 From: Oleksandra Nedashkivska Date: Tue, 10 Sep 2024 11:32:54 +0300 Subject: [PATCH 2/2] OV-220: * fix overlay prop --- .../common/components/protected-route/protected-route.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/bundles/common/components/protected-route/protected-route.tsx b/frontend/src/bundles/common/components/protected-route/protected-route.tsx index 0bd929bee..42bffac9f 100644 --- a/frontend/src/bundles/common/components/protected-route/protected-route.tsx +++ b/frontend/src/bundles/common/components/protected-route/protected-route.tsx @@ -15,7 +15,7 @@ const ProtectedRoute: React.FC = ({ children }) => { if (dataStatus === DataStatus.PENDING) { return ( - + );