Repeat the same process for editing posts as done with create new post in previous chapter.

To render the list of posts, move the List component to it's own component so that it can later be used to show a list of posts for both admin and author.

// components/posts/PostsList
import { List } from "antd";
import Link from "next/link";

const PostsList = ({ posts, handleDelete }) => {
  return (
      renderItem={(item) => (
            <Link href={`/admin/posts/${item.slug}`}>
              <a onClick={() => handleEdit(item)}>edit</a>
            <a onClick={() => handleDelete(item)}>delete</a>,
          <List.Item.Meta title={item.title} />

export default PostsList;

Now import and use in admin/posts/index.s

<PostsList posts={posts} handleDelete={handleDelete} />

Do the same for categories too.