import { useTranslation } from "react-i18n-lite";

interface ReaderErrorScreenProps {
  message: string;
  onBack: () => void;
}

export function ReaderErrorScreen({ message, onBack }: ReaderErrorScreenProps) {
  const { t } = useTranslation();
  return (
    <div className="reader-loading">
      <p className="reader-error">{message}</p>
      <button type="button" className="back-button" onClick={onBack}>
        {t("reader.backToLibrary")}
      </button>
    </div>
  );
}
