feat(bookReader): autoorientation, showcontrols on click, no more toast on load
This commit is contained in:
@@ -5,7 +5,6 @@ import { useRouter } from "next/navigation";
|
||||
import { KomgaBook } from "@/types/komga";
|
||||
import { BookReader } from "./BookReader";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { useToast } from "@/components/ui/use-toast";
|
||||
|
||||
interface ClientBookReaderProps {
|
||||
book: KomgaBook;
|
||||
@@ -14,17 +13,9 @@ interface ClientBookReaderProps {
|
||||
|
||||
export function ClientBookReader({ book, pages }: ClientBookReaderProps) {
|
||||
const router = useRouter();
|
||||
const { toast } = useToast();
|
||||
const [isReading, setIsReading] = useState(false);
|
||||
|
||||
const handleStartReading = () => {
|
||||
// Si le livre a une progression de lecture, on l'affiche dans un toast
|
||||
if (book.readProgress && book.readProgress.page && book.readProgress.page > 0) {
|
||||
toast({
|
||||
title: "Reprise de la lecture",
|
||||
description: `Reprise à la page ${book.readProgress.page}`,
|
||||
});
|
||||
}
|
||||
setIsReading(true);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user