Skip to content

Conversation

MaelBallereau
Copy link

@MaelBallereau MaelBallereau commented Oct 6, 2025

Fix Tailwind syntax and replace <img /> with Next.js Image component

  • Corrected a Tailwind typo: changed llg:w-8 to lg:w-8.
  • Replaced all tags with Next.js components for better performance and optimization.

@Copilot Copilot AI review requested due to automatic review settings October 6, 2025 13:57
Copy link

vercel bot commented Oct 6, 2025

Someone is attempting to deploy a commit to the amFOSS Dev Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the codebase to use Next.js Image components for better performance optimization and fixes a Tailwind CSS syntax error.

  • Replaces all <img> tags with Next.js <Image> components across multiple files
  • Fixes Tailwind CSS typo from llg:w-8 to lg:w-8
  • Adds necessary Image imports to components that didn't have them

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
components/team/teamHero.jsx Added Image import and replaced img tag with Image component
components/team/membersAndAlumni.jsx Replaced img tag with Image component for "See more" toggle
components/team/memberCard.jsx Replaced social media icon img tags with Image components and fixed Tailwind typo
components/gallery/slider.jsx Added Image import and replaced img tag in slider component
components/contact/ContactDetails.jsx Replaced img tag with Image component for contact illustration
components/achievements/infiniteSlider.jsx Added Image import and replaced img tag in infinite slider

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

<div className="flex justify-center flex-col items-center">
{showAllMembers ? "See less" : "See more"}
<img
<Image
Copy link

Copilot AI Oct 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing required 'width' and 'height' props for Next.js Image component. These are required for proper optimization unless using 'fill' prop.

Copilot uses AI. Check for mistakes.

Comment on lines 28 to 31
<Image
src="assets/icons/socials/Vector-3.svg"
alt="github"
className="lg:w-8 md:w-6 w-3 lg:h-8 md:h-6 h-3 mx-2"
Copy link

Copilot AI Oct 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing required 'width' and 'height' props for Next.js Image component. These are required for proper optimization unless using 'fill' prop.

Copilot uses AI. Check for mistakes.

Comment on lines 35 to 38
<Image
src="assets/icons/socials/Vector-2.svg"
alt="twitter"
className="lg:w-8 md:w-6 w-3 lg:h-8 md:h-6 h-3 mx-2"
Copy link

Copilot AI Oct 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing required 'width' and 'height' props for Next.js Image component. These are required for proper optimization unless using 'fill' prop.

Copilot uses AI. Check for mistakes.

Comment on lines 42 to 45
<Image
src="assets/icons/socials/Vector-4.svg"
alt="linkedin"
className="llg:w-8 md:w-6 w-3 lg:h-8 md:h-6 h-3 mx-2"
className="lg:w-8 md:w-6 w-3 lg:h-8 md:h-6 h-3 mx-2"
Copy link

Copilot AI Oct 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing required 'width' and 'height' props for Next.js Image component. These are required for proper optimization unless using 'fill' prop.

Copilot uses AI. Check for mistakes.

return (
<div className="slider group" key={index}>
<img src={imageUrl.url} Transition={Blur} loading="lazy"/>
<Image src={imageUrl.url} Transition={Blur} loading="lazy"/>
Copy link

Copilot AI Oct 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing required 'width' and 'height' props for Next.js Image component. These are required for proper optimization unless using 'fill' prop.

Suggested change
<Image src={imageUrl.url} Transition={Blur} loading="lazy"/>
<Image src={imageUrl.url} width={imageUrl.width} height={imageUrl.height} Transition={Blur} loading="lazy"/>

Copilot uses AI. Check for mistakes.

<img
<Image
src={company.img_path}
alt={company.alt}
Copy link

Copilot AI Oct 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing required 'width' and 'height' props for Next.js Image component. These are required for proper optimization unless using 'fill' prop.

Suggested change
alt={company.alt}
alt={company.alt}
width={176}
height={176}

Copilot uses AI. Check for mistakes.

@KKSurendran06
Copy link
Member

@MaelBallereau I noticed that some <Image> components are missing width and height props. These are required to avoid layout shifts and build errors in Next.js.

Please update your PR accordingly.

@KKSurendran06 KKSurendran06 requested a review from Copilot October 6, 2025 17:10
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

<img src={data.hero.img}
<Image src={data.hero.img}
className="sm:w-[35rem] max-sm:w-[23rem] max-md:mx-5 sm:h-95"
alt="team" />
Copy link

Copilot AI Oct 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Next.js Image component requires width and height props for proper optimization. Add explicit width and height attributes or use the fill prop with a positioned parent container.

Suggested change
alt="team" />
alt="team" width={560} height={380} />

Copilot uses AI. Check for mistakes.

{showAllMembers ? "See less" : "See more"}
<img
<Image
src="/assets/icons/seeMore2.png"
Copy link

Copilot AI Oct 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Next.js Image component requires width and height props for proper optimization. Add explicit width and height attributes based on the w-10 h-10 classes (40px each).

Suggested change
src="/assets/icons/seeMore2.png"
src="/assets/icons/seeMore2.png"
width={40}
height={40}

Copilot uses AI. Check for mistakes.

Comment on lines +47 to 49
<Image src={data.contact.img} width={155}
height={155}
alt="white bulb" />
Copy link

Copilot AI Oct 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing import statement for the Image component. Add 'import Image from "next/image";' at the top of the file.

Copilot uses AI. Check for mistakes.

@MaelBallereau
Copy link
Author

I think its ok now
Thanks you

@KKSurendran06
Copy link
Member

@MaelBallereau Seems like the responsiveness got broken

PR branch amfoss.in reference

The first image is from your PR branch and the second one is from amfoss.in for reference. Please ensure all the updated components are responsive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants