import React, { useRef } from "react"; import { requestScopedT as i18nT } from "~/locale/request-scoped-t"; import { motion, useScroll, useSpring, useTransform } from "motion/react"; import type { Transition } from "motion/react"; export const MovingLine = () => { const transition: Transition = { duration: 14, ease: "easeInOut", }; const ref = useRef(null); // Track scroll progress, lies between 0 and 1. const { scrollYProgress } = useScroll({ target: ref, offset: ["end end", "start start"], }); // when scroll progress reached 1, path length becomes 0. const pathLengthValue = useTransform(scrollYProgress, [0, 1], [1, 0]); const PATH = "M0.5 0.980671L0.5 1566.02"; return (
); }; { /* dummy content to fill up the screen */ } export const Content = () => { return (

{i18nT("components.aceternity.movingLine.title")}

{i18nT("components.aceternity.movingLine.description")}

); };