@@ -2,10 +2,13 @@ import React, { useEffect, useRef } from "react";
22import Link from "@docusaurus/Link" ;
33import { WhyMithrilContents } from "../../homepage-content/why-mithril" ;
44import { cx } from "cva" ;
5+ import useMediaQuery from "../hooks/useMediaQuery" ;
6+ import { forLargeScreen } from "../../helpers/media-queries" ;
57
68const WhyMithril = ( ) => {
79 const containerRef = useRef < HTMLDivElement > ( null ) ;
810 const itemRefs = useRef < ( HTMLDivElement | null ) [ ] > ( [ ] ) ;
11+ const isLargeScreen = useMediaQuery ( forLargeScreen ) ;
912
1013 useEffect ( ( ) => {
1114 let animationFrameId : number ;
@@ -26,8 +29,8 @@ const WhyMithril = () => {
2629 itemRefs . current . forEach ( ( el , index ) => {
2730 if ( ! el ) return ;
2831
29- const start = 0.07 + index * 0.07 ;
30- const end = start + 0.5 ;
32+ const start = 0.07 + index * 0.08 ;
33+ const end = start + 0.75 ;
3134
3235 let localProgress = ( scrollProgress - start ) / ( end - start ) ;
3336 localProgress = Math . min ( Math . max ( localProgress , 0 ) , 1 ) ;
@@ -70,7 +73,7 @@ const WhyMithril = () => {
7073 key = { index }
7174 ref = { ( el ) => ( itemRefs . current [ index ] = el ) }
7275 className = { cx (
73- "grid-item" ,
76+ "timeline- grid-item" ,
7477 item === "Basho" && "text-blue-highlight" ,
7578 ) }
7679 style = { {
0 commit comments