feat(bookReader): autoorientation, showcontrols on click, no more toast on load

This commit is contained in:
Julien Froidefond
2025-02-15 18:01:11 +01:00
parent 1984d2be97
commit bc9a754563
3 changed files with 78 additions and 35 deletions

View File

@@ -13,17 +13,6 @@ interface ClientBookWrapperProps {
export function ClientBookWrapper({ book, pages }: ClientBookWrapperProps) {
const router = useRouter();
const { toast } = useToast();
useEffect(() => {
// 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}`,
});
}
}, [book.readProgress, toast]);
const handleCloseReader = () => {
router.back();