ConceptPortal-public/rsconcept/frontend/src/pages/UserProfilePage/UserProfile.tsx

16 lines
641 B
TypeScript
Raw Normal View History

2023-07-26 10:59:55 +03:00
import { useUserProfile } from '../../hooks/useUserProfile';
2023-07-15 17:46:19 +03:00
2023-07-26 10:59:55 +03:00
export function UserProfile() {
const { user } = useUserProfile();
console.log(user)
2023-07-25 20:27:29 +03:00
return (
2023-07-26 10:59:55 +03:00
<div className='flex flex-col items-center justify-center px-2 py-2 border'>
<p>Логин: {user?.username ?? 'Логин'}</p>
<p>Имя: {user?.first_name ?? 'Имя'}</p>
<p>Фамилия: {user?.last_name ?? 'Фамилия'}</p>
<p>Электронная почта: {user?.email ?? ''}</p>
<button className='px-2 py-1 bg-green-500 border' onClick={() => { console.log('123') } } >Сохранить</button>
2023-07-25 20:27:29 +03:00
</div>
);
2023-07-15 17:46:19 +03:00
}