Show empty home page only to admins

This commit is contained in:
IRBorisov 2023-07-28 01:37:39 +03:00
parent ff75bef064
commit 2b93840807

View File

@ -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 (