File tree Expand file tree Collapse file tree 4 files changed +12
-9
lines changed Expand file tree Collapse file tree 4 files changed +12
-9
lines changed Original file line number Diff line number Diff line change 78
78
"devDependencies" : {
79
79
"@chakra-ui/cli" : " ^2.4.1" ,
80
80
"@chromatic-com/storybook" : " 1.5.0" ,
81
- "@netlify/plugin-nextjs" : " ^5.0.0 " ,
81
+ "@netlify/plugin-nextjs" : " ^5.5.1 " ,
82
82
"@storybook/addon-essentials" : " 8.1.10" ,
83
83
"@storybook/addon-interactions" : " 8.1.10" ,
84
84
"@storybook/addon-links" : " 8.1.10" ,
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ const baseStyle = defineStyle({
14
14
borderRadius : "base" ,
15
15
border : "1px" ,
16
16
color : "primary.base" ,
17
+ fontWeight : "normal" ,
17
18
lineHeight : "1.6" ,
18
19
transitionProperty : "common" ,
19
20
transitionDuration : "normal" ,
Original file line number Diff line number Diff line change @@ -17,6 +17,8 @@ const LazyLoadComponent = <T extends React.ElementType>({
17
17
const ref = useRef < HTMLDivElement > ( null )
18
18
19
19
useEffect ( ( ) => {
20
+ const obsRef = ref . current
21
+
20
22
const observer = new IntersectionObserver ( ( [ entry ] ) => {
21
23
// Update the state when observer callback fires
22
24
if ( entry . isIntersecting ) {
@@ -25,17 +27,17 @@ const LazyLoadComponent = <T extends React.ElementType>({
25
27
}
26
28
} , intersectionOptions )
27
29
28
- if ( ref . current ) {
29
- observer . observe ( ref . current )
30
+ if ( obsRef ) {
31
+ observer . observe ( obsRef )
30
32
}
31
33
32
34
// Clean up the observer on component unmount
33
35
return ( ) => {
34
- if ( ref . current ) {
36
+ if ( obsRef ) {
35
37
observer . disconnect ( )
36
38
}
37
39
}
38
- } , [ ] )
40
+ } , [ intersectionOptions ] )
39
41
40
42
return (
41
43
< div ref = { ref } >
Original file line number Diff line number Diff line change 3624
3624
pump "^3.0.0"
3625
3625
tar-fs "^2.1.1"
3626
3626
3627
- "@netlify/plugin-nextjs@^5.0.0 ":
3628
- version "5.3.2 "
3629
- resolved "https://registry.yarnpkg.com/@netlify/plugin-nextjs/-/plugin-nextjs-5.3.2 .tgz#c8faf96631d2eaf35c0f1c0afa5b4da3d3cefdc0 "
3630
- integrity sha512-DC3sNpWnnhIfJxAfqdktbkU2LxYUDKCVQnxqEhJSyheQ5G9ILu1spUKa5pEe8X2EvtH8FwtMAc7Gi5h6pft22A ==
3627
+ "@netlify/plugin-nextjs@^5.5.1 ":
3628
+ version "5.5.1 "
3629
+ resolved "https://registry.yarnpkg.com/@netlify/plugin-nextjs/-/plugin-nextjs-5.5.1 .tgz#463ac58b59a1732f6de7dd7ad9fda484e4509f6f "
3630
+ integrity sha512-E0LP4HI6F1Us0va+rCpu9ecJh1GumoH/plQDvAteZv0C4nSP19tn1H+tJUjpVVDsoj6MWIB97ssMh8K0gen1zA ==
3631
3631
3632
3632
3633
3633
version "14.2.3"
You can’t perform that action at this time.
0 commit comments