mirror of
https://github.com/IRBorisov/ConceptPortal.git
synced 2025-06-26 04:50:36 +03:00
Show empty home page only to admins
This commit is contained in:
parent
ff75bef064
commit
2b93840807
|
@ -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 (
|
||||
|
|
Loading…
Reference in New Issue
Block a user