fix: warn on images

This commit is contained in:
Julien Froidefond
2025-03-02 15:37:42 +01:00
parent 43f76dfde6
commit 5d31c87374
3 changed files with 5 additions and 5 deletions

View File

@@ -2,7 +2,7 @@
import { CoverClient } from "./cover-client"; import { CoverClient } from "./cover-client";
import { ProgressBar } from "./progress-bar"; import { ProgressBar } from "./progress-bar";
import type { BookCoverProps} from "./cover-utils"; import type { BookCoverProps } from "./cover-utils";
import { getImageUrl } from "./cover-utils"; import { getImageUrl } from "./cover-utils";
import { ClientOfflineBookService } from "@/lib/services/client-offlinebook.service"; import { ClientOfflineBookService } from "@/lib/services/client-offlinebook.service";
import { MarkAsReadButton } from "./mark-as-read-button"; import { MarkAsReadButton } from "./mark-as-read-button";
@@ -52,7 +52,7 @@ export function BookCover({
alt = "Image de couverture", alt = "Image de couverture",
className, className,
quality = 80, quality = 80,
sizes = "100vw", sizes = "(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw",
showProgressUi = true, showProgressUi = true,
onSuccess, onSuccess,
showControls = true, showControls = true,

View File

@@ -20,7 +20,7 @@ export const CoverClient = ({
alt, alt,
className, className,
quality = 80, quality = 80,
sizes = "100vw", sizes = "(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw",
isCompleted = false, isCompleted = false,
}: CoverClientProps) => { }: CoverClientProps) => {
const [imageError, setImageError] = useState(false); const [imageError, setImageError] = useState(false);

View File

@@ -2,7 +2,7 @@
import { CoverClient } from "./cover-client"; import { CoverClient } from "./cover-client";
import { ProgressBar } from "./progress-bar"; import { ProgressBar } from "./progress-bar";
import type { SeriesCoverProps} from "./cover-utils"; import type { SeriesCoverProps } from "./cover-utils";
import { getImageUrl } from "./cover-utils"; import { getImageUrl } from "./cover-utils";
export function SeriesCover({ export function SeriesCover({
@@ -10,7 +10,7 @@ export function SeriesCover({
alt = "Image de couverture", alt = "Image de couverture",
className, className,
quality = 80, quality = 80,
sizes = "100vw", sizes = "(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw",
showProgressUi = true, showProgressUi = true,
}: SeriesCoverProps) { }: SeriesCoverProps) {
const imageUrl = getImageUrl("series", series.id); const imageUrl = getImageUrl("series", series.id);