"use client";
import { usePermission } from "@/lib/usePermission";

export function QuickActions() {
  const { can } = usePermission();
  const canWrite = can("POST", "CREATE");
  const isAdmin = can("ADMIN", "ADMINISTER") || can("BOARD", "MODERATE");
  return (
    <div style={{ display: "flex", gap: 8 }}>
      {canWrite && <a href="/posts/new"><button>글쓰기</button></a>}
      {isAdmin && <a href="/admin"><button>관리자</button></a>}
    </div>
  );
}


