2023-07-15 17:46:19 +03:00
|
|
|
import BackendError from '../../components/BackendError';
|
|
|
|
import { Loader } from '../../components/Common/Loader';
|
|
|
|
import { useUserProfile } from '../../hooks/useUserProfile';
|
|
|
|
import { UserProfile } from './UserProfile';
|
|
|
|
|
|
|
|
function UserProfilePage() {
|
|
|
|
const { user, error, loading } = useUserProfile();
|
|
|
|
|
|
|
|
return (
|
2023-07-20 17:11:03 +03:00
|
|
|
<div className='w-full'>
|
2023-07-15 17:46:19 +03:00
|
|
|
{ loading && <Loader /> }
|
|
|
|
{ error && <BackendError error={error} />}
|
2023-07-26 10:59:55 +03:00
|
|
|
{ user && <UserProfile /> }
|
2023-07-15 17:46:19 +03:00
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2023-07-25 20:27:29 +03:00
|
|
|
export default UserProfilePage;
|