import { Link } from "react-router-dom";
import { useAuth } from "../hooks/useAuth";

export default function Nav() {
  const { logout } = useAuth();

  return (
    <nav style={{
      display: "flex",
      alignItems: "center",
      gap: 16,
      padding: "12px 24px",
      borderBottom: "1px solid #ccc",
    }}>
      <Link to="/">Home</Link>
      <Link to="/apps">Apps</Link>
      <Link to="/settings">Settings</Link>
      <button
        onClick={logout}
        style={{ marginLeft: "auto", cursor: "pointer" }}
      >
        Logout
      </button>
    </nav>
  );
}
