'use client';

import { use } from 'react';
import { Book } from './Book';

type Props = {
  book: Promise<Book>;
};

const Details: React.FC<Props> = ({ book }) => {
  const { title, author, isbn } = use(book);

  return (
    <div>
      <h1>{title}</h1>
      <h2>von {author}</h2>
      <p>ISBN: {isbn}</p>
    </div>
  );
};

export default Details;
