chore: replace nextjs Image element (#1227)

This commit is contained in:
Aaryan Khandelwal 2023-06-07 01:56:21 +05:30 committed by GitHub
parent 1f3fdd5d0a
commit 684df96969
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 121 additions and 186 deletions

View file

@ -1,7 +1,5 @@
import React, { useEffect, useState } from "react";
import Image from "next/image";
// react-hook-form
import { Controller, useForm } from "react-hook-form";
// services
@ -168,14 +166,11 @@ const Profile: NextPage = () => {
</div>
) : (
<div className="relative h-12 w-12 overflow-hidden">
<Image
<img
src={watch("avatar")}
alt={myProfile.first_name}
layout="fill"
objectFit="cover"
className="rounded-md"
className="absolute top-0 left-0 h-full w-full object-cover rounded-md"
onClick={() => setIsImageUploadModalOpen(true)}
priority
alt={myProfile.first_name}
/>
</div>
)}