fix: error on hydration and ErrorMessage
This commit is contained in:
@@ -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>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user