Skip to content

Commit aab60db

Browse files
authored
Revert "Change sticky image with an animation (#282)"
This reverts commit 3628a0f.
1 parent 3628a0f commit aab60db

File tree

1 file changed

+4
-20
lines changed

1 file changed

+4
-20
lines changed

website/src/components/StickyGrid/index.tsx

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
1-
import React, { ComponentProps, useId, useRef } from "react";
2-
import {
3-
AnimatePresence,
4-
motion,
5-
useMotionValueEvent,
6-
useScroll,
7-
} from "motion/react";
1+
import React, { ComponentProps, useRef } from "react";
2+
import { useMotionValueEvent, useScroll } from "motion/react";
83
import { Card } from "..";
94

105
type Props = {
@@ -33,7 +28,6 @@ export const StickyGrid = ({ cards }: Props) => {
3328
);
3429
setActiveCard(closestBreakpointIndex);
3530
});
36-
const id = useId();
3731

3832
return (
3933
<div className="w-full flex flex-row gap-20" ref={ref}>
@@ -50,18 +44,8 @@ export const StickyGrid = ({ cards }: Props) => {
5044
</div>
5145
))}
5246
</div>
53-
<div className="sticky top-24 right-0 hidden aspect-[3/2] h-full w-1/2 overflow-hidden rounded-md md:block">
54-
<AnimatePresence mode="popLayout">
55-
<motion.div
56-
key={activeCardIndex}
57-
initial={{ opacity: 0 }}
58-
animate={{ opacity: 1 }}
59-
exit={{ opacity: 0 }}
60-
transition={{ duration: 0.5 }}
61-
>
62-
{cards[activeCardIndex].image}
63-
</motion.div>
64-
</AnimatePresence>
47+
<div className="sticky top-24 hidden aspect-[3/2] h-full w-1/2 overflow-hidden rounded-md md:block">
48+
{cards[activeCardIndex].image}
6549
</div>
6650
</div>
6751
);

0 commit comments

Comments
 (0)