File tree Expand file tree Collapse file tree 1 file changed +4
-20
lines changed
website/src/components/StickyGrid Expand file tree Collapse file tree 1 file changed +4
-20
lines changed Original file line number Diff line number Diff line change 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" ;
8
3
import { Card } from ".." ;
9
4
10
5
type Props = {
@@ -33,7 +28,6 @@ export const StickyGrid = ({ cards }: Props) => {
33
28
) ;
34
29
setActiveCard ( closestBreakpointIndex ) ;
35
30
} ) ;
36
- const id = useId ( ) ;
37
31
38
32
return (
39
33
< div className = "w-full flex flex-row gap-20" ref = { ref } >
@@ -50,18 +44,8 @@ export const StickyGrid = ({ cards }: Props) => {
50
44
</ div >
51
45
) ) }
52
46
</ 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 }
65
49
</ div >
66
50
</ div >
67
51
) ;
You can’t perform that action at this time.
0 commit comments