fix: download button open book

This commit is contained in:
Julien Froidefond
2025-03-16 21:21:30 +01:00
parent d47da16014
commit a964e0960c

View File

@@ -219,7 +219,9 @@ export function BookOfflineButton({ book, className }: BookOfflineButtonProps) {
checkStatus(); checkStatus();
}, [book.id, checkOfflineAvailability, downloadBook, getBookStatus, setBookStatus]); }, [book.id, checkOfflineAvailability, downloadBook, getBookStatus, setBookStatus]);
const handleToggleOffline = async () => { const handleToggleOffline = async (e: React.MouseEvent) => {
e.stopPropagation(); // Empêcher la propagation au parent
if (!("caches" in window)) { if (!("caches" in window)) {
toast({ toast({
title: "Non supporté", title: "Non supporté",