text: import React from "react"
  import { Link, graphql, useStaticQuery } from "gatsby"
  
  export default function Navbar() {
    //hook can only be used once inside a component
    const data = useStaticQuery(graphql`
      query SiteInfo {
        site(siteMetadata: {}) {
          siteMetadata {
            title
          }
        }
      }
    `)
    const {title} = data.site.siteMetadata;
    return (
      <nav>
        <h1>{title}</h1>
        <div className="links">
          <Link to="/">Home</Link>
          <Link to="/about">About</Link>
          <Link to="/projects">Portfolio Projects</Link>
        </div>
      </nav>
    )
  }
  