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() {
|
function HomePage() {
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const { user } = useAuth();
|
const { user } = useAuth();
|
||||||
if (user) {
|
if (!user) {
|
||||||
navigate('/library?filter=personal');
|
|
||||||
} else {
|
|
||||||
navigate('/library?filter=common');
|
navigate('/library?filter=common');
|
||||||
|
} else if(!user.is_staff) {
|
||||||
|
navigate('/library?filter=personal');
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
Loading…
Reference in New Issue
Block a user