text: import React, { Component } from "react";
  import { Link, animateScroll as scroll } from "react-scroll";
  import "./Navbar.css";
  
  export default class Navbar extends Component {
    scrollToTop = () => {
      scroll.scrollToTop();
    };
  
    render() {
      return (
        <nav className="nav" id="navbar">
          <div className="nav-content">
            <ul id="nav" className="nav-items">
              <li className="nav-item">
                <Link
                  activeClass="active"
                  to="home"
                  spy={true}
                  smooth={true}
                  offset={-70}
                  duration={500}
                >
                  HOME
                </Link>
              </li>
              <li className="nav-item">
                <Link
                  activeClass="active"
                  to="section2"
                  spy={true}
                  smooth={true}
                  offset={-70}
                  duration={500}
                >
                  Section 2
                </Link>
              </li>
              <li className="nav-item">
                <Link
                  activeClass="active"
                  to="section3"
                  spy={true}
                  smooth={true}
                  offset={-70}
                  duration={500}
                >
                  Section 3
                </Link>
              </li>
              <li className="nav-item">
                <Link
                  activeClass="active"
                  to="section4"
                  spy={true}
                  smooth={true}
                  offset={-70}
                  duration={500}
                >
                  Section 4
                </Link>
              </li>
              <li className="nav-item">
                <Link
                  activeClass="active"
                  to="section5"
                  spy={true}
                  smooth={true}
                  offset={-70}
                  duration={500}
                >
                  Section 5
                </Link>
              </li>
            </ul>
          </div>
        </nav>
      );
    }
  }
  