import React, { useRef, useState } from "react"; import Footer from "./Footer/Footer"; import SideBar from "./SideBar"; import Body from "./Body"; import NavBar from "./NavBar"; import { Container } from "./style"; function Dashboad() { const [headerBackground, setHeaderBackground] = useState(false); const [navBackground, setNavBackground] = useState(false); const bodyRef = useRef(); const bodyScrolled = () => { bodyRef.current.scrollTop >= 30 ? setNavBackground(true) : setNavBackground(false); bodyRef.current.scrollTop >= 268 ? setHeaderBackground(true) : setHeaderBackground(false); }; return (
); } export default Dashboad;