change upload foto function

This commit is contained in:
ehsanahmadi456
2025-03-31 05:08:57 +03:30
parent 23b04d9bf5
commit de3620c7fd
3 changed files with 25 additions and 29 deletions
+23 -19
View File
@@ -43,27 +43,31 @@ function UploadFile({ image, setImage }) {
className="contents"
onChange={handleChange}
/>
{image ? (
<Image
width={24}
height={24}
src={image}
alt="img-uploaded"
className="w-[74px] h-[74px] rounded-full overflow-hidden object-cover"
/>
) : (
<div className="p-[24px] grid place-items-center border border-solid border-[#EFEFEF] bg-[#EFEFEF] rounded-full">
<ProfileP />
</div>
)}
<Button
variant="text"
<div
onClick={openInput}
className="!flex !p-1 dark:!text-[#A1A1A1] !text-[#525252] !text-[16px] !font-medium !items-center !justify-center !gap-[4px]"
className="flex items-center justify-start gap-[10px] cursor-pointer"
>
انتخاب تصویر
<ArrowLeftPU />
</Button>
{image ? (
<Image
width={24}
height={24}
src={image}
alt="img-uploaded"
className="w-[74px] h-[74px] rounded-full overflow-hidden object-cover"
/>
) : (
<div className="p-[24px] grid place-items-center border border-solid border-[#EFEFEF] bg-[#EFEFEF] rounded-full">
<ProfileP />
</div>
)}
<Button
variant="text"
className="!flex !p-1 dark:!text-[#A1A1A1] !text-[#525252] !text-[16px] !font-medium !items-center !justify-center !gap-[4px]"
>
انتخاب تصویر
<ArrowLeftPU />
</Button>
</div>
</>
);
}