import { Link } from 'react-router';
import { books } from './books';

const List: React.FC = () => {
  return (
    <ul>
      {books.map((book) => (
        <li key={book.id}>
          <Link to={`/books/${book.id}`}>
            {book.title} von {book.author}
          </Link>
        </li>
      ))}
    </ul>
  );
};

export default List;
