fix: download button open book
This commit is contained in:
@@ -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é",
|
||||||
|
|||||||
Reference in New Issue
Block a user