Skip to content

Commit

Permalink
Error fix
Browse files Browse the repository at this point in the history
  • Loading branch information
luloxi committed Oct 15, 2024
1 parent c319b24 commit c66280e
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions packages/nextjs/app/profile/_components/ProfilePictureUpload.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ const ProfilePictureUpload: React.FC<ProfilePictureUploadProps> = ({
const [previewImage, setPreviewImage] = useState<string>("");
const [dragActive, setDragActive] = useState(false);
const [loading, setLoading] = useState(false);
const [hovered, setHovered] = useState(false);

useEffect(() => {
if (profilePicture) {
Expand Down Expand Up @@ -90,8 +89,6 @@ const ProfilePictureUpload: React.FC<ProfilePictureUploadProps> = ({
onDragOver={handleDragOver}
onDragLeave={handleDragLeave}
onDrop={handleDrop}
onMouseEnter={() => setHovered(true)}
onMouseLeave={() => setHovered(false)}
>
<input
type="file"
Expand Down Expand Up @@ -140,14 +137,6 @@ const ProfilePictureUpload: React.FC<ProfilePictureUploadProps> = ({
height={128}
/>
)}
{hovered && previewImage && (
<button
className="absolute top-5 right-5 bg-red-500 text-white w-6 h-6 flex items-center justify-center rounded-full"
onClick={handleRemoveImage}
>
</button>
)}
{loading && (
<div className="absolute inset-0 flex items-center justify-center bg-gray-700 bg-opacity-75 text-white">
Uploading...
Expand Down

0 comments on commit c66280e

Please sign in to comment.