feat: tempcommit

This commit is contained in:
Maximilian Liebmann 2025-06-26 22:48:56 +02:00 committed by SomeCodecat
parent a308158ca7
commit 0c260820e2
2 changed files with 87 additions and 58 deletions

View file

@ -0,0 +1,35 @@
import Image from 'next/image';
import { Avatar } from '../ui/avatar';
import { useGetApiUserMe } from '@/generated/api/user/user';
import { User } from 'lucide-react';
import { Input } from '../ui/input';
export default function ProfilePictureUpload() {
const { data } = useGetApiUserMe();
return (
<>
<div className='grid grid-cols-1 gap-1'>
<span className='relative flex space-6'>
<Input
id='pic-upload'
type='file'
defaultValue={data?.data.user.image ?? undefined}
/>
<Avatar className='flex justify-center items-center ml-6 shadow-md border h-[36px] w-[36px]'>
{data?.data.user.image ? (
<Image
src={data?.data.user.image}
alt='Avatar'
width='20'
height='20'
/>
) : (
<User />
)}
</Avatar>
</span>
</div>
</>
);
}