Blog option

mail@pastecode.io avatar
unknown
typescript
a year ago
486 B
0
Indexable
Never
function BlogOption({ blog, setDeleted }: Props) {
  return (
    <div>
      <Link href={`/blog/${blog._id}`}>
        <div className="text-blue-700">{blog.title}</div>
      </Link>
      <button
        className="bg-red-500 text-white active:bg-red-600 px-1 mx-2 border border-black"
        onClick={() => handleDelete(blog._id, setDeleted)}
      >
        delete
      </button>
      <button className="px-1 border border-blue-800">Edit</button>
    </div>
  );
}