fix: error on hydration and ErrorMessage

This commit is contained in:
Julien Froidefond
2025-02-28 07:38:48 +01:00
parent 4994cbd2e9
commit 5893f1a15f
6 changed files with 10 additions and 8 deletions

View File

@@ -6,6 +6,7 @@ import { notFound } from "next/navigation";
import { withPageTiming } from "@/lib/hoc/withPageTiming";
import { KomgaBookWithPages } from "@/types/komga";
import { ErrorMessage } from "@/components/ui/ErrorMessage";
import { ERROR_CODES } from "@/constants/errorCodes";
async function BookPage({ params }: { params: { bookId: string } }) {
try {
@@ -20,7 +21,7 @@ async function BookPage({ params }: { params: { bookId: string } }) {
console.error("Erreur:", error);
return (
<div className="container py-8 space-y-8">
<ErrorMessage error={error as Error} errorCode="BOOK_FETCH_ERROR" />
<ErrorMessage errorCode={ERROR_CODES.SERIES.FETCH_ERROR} />
</div>
);
}