- Added `SettingsDropdown` component for selecting settings sections with icons and descriptions. - Created `SettingsPage` component to manage user settings, including account details, notifications, calendar availability, privacy, and appearance. - Introduced `SettingsSwitcher` for selecting options within settings. - Integrated command and dialog components for improved user interaction. - Updated `UserDropdown` to include links for settings and logout. - Refactored button styles and card footer layout for consistency. - Added popover functionality for dropdown menus. - Updated dependencies in `yarn.lock` for new components. feat: tempcommit feat: tempcommit
29 lines
843 B
TypeScript
29 lines
843 B
TypeScript
import { useGetApiUserMe } from '@/generated/api/user/user';
|
|
import { Avatar } from '@/components/ui/avatar';
|
|
import Image from 'next/image';
|
|
import { User } from 'lucide-react';
|
|
|
|
export default function UserCard() {
|
|
const { data } = useGetApiUserMe();
|
|
return (
|
|
<div className='w-full'>
|
|
<Avatar className='flex justify-center items-center'>
|
|
{data?.data.user.image ? (
|
|
<Image
|
|
className='border-2 rounded-md'
|
|
src={data?.data.user.image}
|
|
alt='Avatar'
|
|
width='50'
|
|
height='50'
|
|
/>
|
|
) : (
|
|
<User />
|
|
)}
|
|
</Avatar>
|
|
<div className='flex justify-center'>{data?.data.user.name}</div>
|
|
<div className='flex justify-center text-text-muted text-[12px]'>
|
|
{data?.data.user.email}
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|