From ad29c6024e0f0ab9a3f7f6b86ad7c6aaac3aa1b2 Mon Sep 17 00:00:00 2001 From: Tyler Yu Date: Wed, 9 Oct 2024 02:16:15 -0700 Subject: [PATCH] feat: framer motion animation --- .../src/components/ResultCard/ResultCard.jsx | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/packages/web/src/components/ResultCard/ResultCard.jsx b/packages/web/src/components/ResultCard/ResultCard.jsx index c592836..27cfb17 100644 --- a/packages/web/src/components/ResultCard/ResultCard.jsx +++ b/packages/web/src/components/ResultCard/ResultCard.jsx @@ -16,9 +16,12 @@ import { } from "@chakra-ui/react"; import { InfoIcon, TimeIcon, CalendarIcon } from "@chakra-ui/icons"; import { FaMapMarkerAlt } from "react-icons/fa"; +import { motion } from "framer-motion"; import InfoModal from "../InfoModal/InfoModal.jsx"; import { formatDate } from "../../utils/DateUtils.js"; +const MotionBox = motion(Box); + const ResultCard = React.memo( ({ props, setData, onResultsBarClose, setLeaderboard }) => { const { colorMode } = useColorMode(); @@ -36,15 +39,18 @@ const ResultCard = React.memo( return ( <> -