Skip to content

Commit

Permalink
UI improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
luloxi committed Oct 15, 2024
1 parent 41d16a6 commit 884df78
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 14 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
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export const PostCard = ({ post }: { post: Post }) => {
src={post.image || "/path/to/default/image.png"}
alt="NFT Image"
className="w-full h-auto rounded-lg object-cover"
layout="responsive"
// layout="responsive"
width={800} // Adjust this to the desired fullscreen width
height={800} // Adjust this to maintain the aspect ratio of the image
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export const PostCard = ({ post }: { post: Post }) => {
src={post.image || "/path/to/default/image.png"}
alt="NFT Image"
className="w-full h-auto rounded-lg object-cover"
layout="responsive"
// layout="responsive"
width={800} // Adjust this to the desired fullscreen width
height={800} // Adjust this to maintain the aspect ratio of the image
/>
Expand Down
2 changes: 1 addition & 1 deletion packages/nextjs/components/punk-society/PostCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ export const PostCard = ({ post }: { post: Post }) => {
src={post.image || "/path/to/default/image.png"}
alt="NFT Image"
className="w-full h-auto rounded-lg object-cover"
layout="responsive"
// layout="responsive"
width={800} // Adjust this to the desired fullscreen width
height={800} // Adjust this to maintain the aspect ratio of the image
/>
Expand Down

0 comments on commit 884df78

Please sign in to comment.