mirror of
https://github.com/IRBorisov/ConceptPortal.git
synced 2025-06-26 21:10:38 +03:00
22 lines
452 B
TypeScript
22 lines
452 B
TypeScript
import { useNavigate } from 'react-router-dom';
|
|
|
|
import { useAuth } from '../context/AuthContext';
|
|
|
|
function HomePage() {
|
|
const navigate = useNavigate();
|
|
const { user } = useAuth();
|
|
if (user) {
|
|
navigate('/library?filter=personal');
|
|
} else {
|
|
navigate('/library?filter=common');
|
|
}
|
|
|
|
return (
|
|
<div className='flex flex-col items-center justify-center w-full py-2'>
|
|
<p>Home page</p>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
export default HomePage;
|