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

@@ -8,6 +8,7 @@ import { ErrorMessage } from "@/components/ui/ErrorMessage";
import { LibraryResponse } from "@/types/library";
import { KomgaSeries, KomgaLibrary } from "@/types/komga";
import { UserPreferences } from "@/types/preferences";
import { ERROR_CODES } from "@/constants/errorCodes";
interface PageProps {
params: { libraryId: string };
@@ -98,13 +99,13 @@ async function LibraryPage({ params, searchParams }: PageProps) {
<h1 className="text-3xl font-bold">Séries</h1>
<RefreshButton libraryId={params.libraryId} refreshLibrary={refreshLibrary} />
</div>
<ErrorMessage error={error as Error} errorCode="SERIES_FETCH_ERROR" />
<ErrorMessage errorCode={ERROR_CODES.SERIES.FETCH_ERROR} />
</div>
);
}
return (
<div className="container py-8 space-y-8">
<ErrorMessage error={error as Error} errorCode="SERIES_FETCH_ERROR" />
<ErrorMessage errorCode={ERROR_CODES.SERIES.FETCH_ERROR} />
</div>
);
}