Removed useless console.logs, switched errors to console.error

This commit is contained in:
2021-08-09 10:50:43 +03:00
parent 8705feffbc
commit 582e64db0d
3 changed files with 2 additions and 7 deletions

View File

@ -21,11 +21,8 @@ export const useBookState = (
}, [hash]);
useEffect(() => {
console.log(Boolean(!ready && state?.currentPage && goToPage));
if (!ready && state?.currentPage && pagesReady) {
console.log("Go to", state.currentPage);
goToPage(state.currentPage);
console.log("Ready");
setReady(true);
} else if (hash && !ready && pagesReady && typeof state === "object") {
saveBookState(hash, { currentPage: 0 });
@ -36,7 +33,6 @@ export const useBookState = (
useEffect(
() => () => {
if (hash) {
console.log(currentPage);
if (ready && state) saveBookState(hash, state);
else saveBookState(hash, { currentPage: currentPage.current || 0 });
}