Skip to content

Commit c595ebf

Browse files
Merge pull request #81 from acm-ucr/mialsong/AnimatePartnersImg
added animation to partners image
2 parents e8a2b66 + ad032fa commit c595ebf

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/components/home/Partners.tsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,26 @@
1+
"use client";
12
import Carousel from "@/components/Carousel";
23
import partners from "@/data/partners";
34
import Heading from "../Heading";
45
import Image from "next/image";
56
import groupPhoto2 from "@/public/home/group2withdots.webp";
7+
import { motion } from "motion/react";
68

79
const Partners = () => {
810
return (
911
<>
1012
{/* TODO: Change this to subheading after its done */}
1113
<Heading title="Partners" />
1214
<Carousel data={partners} />
13-
<Image src={groupPhoto2} alt="Group Photo 2" className="w-1/2 pb-12" />
15+
<motion.div
16+
initial={{ opacity: 0.5, scale: 0.5 }}
17+
whileInView={{ opacity: 1, scale: 1 }}
18+
transition={{ type: "spring", duration: 1, bounce: 0.2 }}
19+
viewport={{ once: true }}
20+
className="flex justify-center"
21+
>
22+
<Image src={groupPhoto2} alt="Group Photo 2" className="w-1/2 pb-12" />
23+
</motion.div>
1424
</>
1525
);
1626
};

0 commit comments

Comments
 (0)