Skip to content

Commit

Permalink
Feat: Replace img with Image component for optimized loading in Perfo…
Browse files Browse the repository at this point in the history
…rmerSection
  • Loading branch information
joywin2003 committed Nov 9, 2024
1 parent 424f750 commit 44bd62a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/widget/performers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import Lenis from "@studio-freight/lenis";
import { useGSAP } from "@gsap/react";
import { tedxsjecAssetsPrefix } from "@/lib/utils";
import { Dialog, DialogContent } from "@/components/ui/dialog";
import Image from "next/image";
gsap.registerPlugin(ScrollTrigger);

interface PerformerSection {
Expand Down Expand Up @@ -156,7 +157,7 @@ export default function Component() {
onClick={() => handleSectionClick(section)}
>
{section.images.map((image, imageIndex) => (
<img
<Image
key={imageIndex}
src={image}
alt={`Performer section ${sectionIndex + 1}, slide ${imageIndex + 1} of ${section.images.length}`}
Expand Down

0 comments on commit 44bd62a

Please sign in to comment.