From 2b938408079825f01c33b1cedf8a28f035db138a Mon Sep 17 00:00:00 2001 From: IRBorisov <8611739+IRBorisov@users.noreply.github.com> Date: Fri, 28 Jul 2023 01:37:39 +0300 Subject: [PATCH] Show empty home page only to admins --- rsconcept/frontend/src/pages/HomePage.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rsconcept/frontend/src/pages/HomePage.tsx b/rsconcept/frontend/src/pages/HomePage.tsx index 7972d76c..4f69ffdb 100644 --- a/rsconcept/frontend/src/pages/HomePage.tsx +++ b/rsconcept/frontend/src/pages/HomePage.tsx @@ -5,10 +5,10 @@ import { useAuth } from '../context/AuthContext'; function HomePage() { const navigate = useNavigate(); const { user } = useAuth(); - if (user) { - navigate('/library?filter=personal'); - } else { + if (!user) { navigate('/library?filter=common'); + } else if(!user.is_staff) { + navigate('/library?filter=personal'); } return (