text: import React, { useState, useEffect } from "react";
  
  import Navigation from "../navigation/navigation";
  
  import styles from "./header.module.css";
  
  const Header = () => {
    const [header, setHeader] = useState(false);
  
    useEffect(() => {
      const fixedHeader = () => {
        if (window.scrollY >= 1) {
          setHeader(true);
        } else {
          setHeader(false);
        }
      };
  
      window.addEventListener("scroll", fixedHeader);
  
      return () => {
        window.removeEventListener("scroll", fixedHeader);
      };
    }, []);
  
    return (
      <header className={styles["c-header"]}>
        <div
          className={
            header
              ? styles["header__container"] + " " + styles["header__fixed"]
              : styles["header__container"]
          }
        >
          <div className="container">
            <div className={styles.header__content}>
              <Navigation />
            </div>
          </div>
        </div>
      </header>
    );
  };
  
  export default Header;
  