import React from 'react';
import { useAdmin } from '../context/AdminContext';
import './SiteHeader.css';

export default function SiteHeader() {
  const { handleLogoClick } = useAdmin();
  const logoSrc = `${import.meta.env.BASE_URL}logo.png`;

  return (
    <header className="site-header">
      <button
        type="button"
        className="site-logo-button"
        onClick={handleLogoClick}
        aria-label="萌芽笔记"
        title="萌芽笔记"
      >
        <img src={logoSrc} alt="" className="site-logo-img" width={36} height={36} />
      </button>
      <span className="site-title">萌芽笔记</span>
    </header>
  );
}
