ConceptPortal-public/rsconcept/frontend/src/pages/HomePage.tsx

22 lines
452 B
TypeScript
Raw Normal View History

import { useNavigate } from 'react-router-dom';
2023-07-25 20:27:29 +03:00
import { useAuth } from '../context/AuthContext';
2023-07-15 17:46:19 +03:00
function HomePage() {
const navigate = useNavigate();
2023-07-25 20:27:29 +03:00
const { user } = useAuth();
if (user) {
2023-07-28 00:03:37 +03:00
navigate('/library?filter=personal');
} else {
2023-07-28 00:03:37 +03:00
navigate('/library?filter=common');
}
2023-07-25 20:27:29 +03:00
2023-07-15 17:46:19 +03:00
return (
<div className='flex flex-col items-center justify-center w-full py-2'>
<p>Home page</p>
</div>
);
}
2023-07-25 20:27:29 +03:00
export default HomePage;