diff --git a/src/components/board/BoardCard.tsx b/src/components/board/BoardCard.tsx index c86353c..cebc806 100644 --- a/src/components/board/BoardCard.tsx +++ b/src/components/board/BoardCard.tsx @@ -1,5 +1,6 @@ "use client"; +import { motion } from "motion/react"; import Link from "next/link"; import { useState } from "react"; import Image, { StaticImageData } from "next/image"; @@ -12,36 +13,49 @@ interface CardInfo { position: string; emailLink: string; about: string; + index: number; } -const BoardCard = ({ name, image, position, emailLink, about }: CardInfo) => { +const boardAnimation = { + initial: { y: 20, opacity: 0 }, + whileInView: { y: 0, opacity: 1 }, + transition: { duration: 0.8 }, + viewport: { once: true }, +}; + +const BoardCard = ({ + name, + image, + position, + emailLink, + about, + index, +}: CardInfo) => { const [showAbout, setShowAbout] = useState(false); return ( -
- {name} + + {name}
{name}
-
+
{position}
- + {showAbout && (
@@ -49,14 +63,15 @@ const BoardCard = ({ name, image, position, emailLink, about }: CardInfo) => {
)} - - - -
+ + + +
+ ); }; diff --git a/src/components/board/BoardGrid.tsx b/src/components/board/BoardGrid.tsx index 77e46ca..233e93a 100644 --- a/src/components/board/BoardGrid.tsx +++ b/src/components/board/BoardGrid.tsx @@ -32,6 +32,7 @@ const BoardGrid = () => { position={position} emailLink={emailLink} about={about} + index={index} />
))}