"use client"; import { ArrowLongLeftIcon, ArrowSmallUpIcon } from "@heroicons/react/24/solid"; import Link from "next/link"; import { ReactNode, useEffect, useState } from "react"; interface Props { children: ReactNode; } const ArticlesLayout = ({ children }: Props) => { const [isTopOfPage, setIsTopOfPage] = useState(true); useEffect(() => { const handleScroll = () => { if (window.scrollY <= 500) { setIsTopOfPage(true); } else { setIsTopOfPage(false); } }; window.addEventListener("scroll", handleScroll); return () => window.removeEventListener("scroll", handleScroll); }, []); return (