Update to react v19
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
import { MutableRefObject, useEffect, useRef } from 'react';
|
||||
|
||||
export const useReaderHideCursorOnInactivity = (scrollElementRef: MutableRefObject<HTMLDivElement | null>) => {
|
||||
const mouseInactiveTimeout = useRef<NodeJS.Timeout>();
|
||||
const mouseInactiveTimeout = useRef<NodeJS.Timeout>(undefined);
|
||||
|
||||
useEffect(() => {
|
||||
const setCursorVisibility = (visible: boolean) => {
|
||||
|
||||
@@ -39,7 +39,7 @@ export const useReaderSetPagesState = (
|
||||
setPageToScrollToIndex: ReaderStatePages['setPageToScrollToIndex'],
|
||||
setTransitionPageMode: ReaderStatePages['setTransitionPageMode'],
|
||||
) => {
|
||||
const previousPageData = useRef<string[]>();
|
||||
const previousPageData = useRef<string[]>(undefined);
|
||||
|
||||
useLayoutEffect(() => {
|
||||
const pagesPayload = pagesResponse.data?.fetchChapterPages;
|
||||
|
||||
@@ -30,9 +30,9 @@ export const useReaderShowSettingPreviewOnChange = (
|
||||
const { t } = useTranslation();
|
||||
|
||||
// show setting previews on change or when open reader
|
||||
const previousReadingMode = useRef<IReaderSettingsWithDefaultFlag['readingMode']>();
|
||||
const previousTapZoneLayout = useRef<IReaderSettingsWithDefaultFlag['tapZoneLayout']>();
|
||||
const previousTapZoneInvertMode = useRef<IReaderSettingsWithDefaultFlag['tapZoneInvertMode']>();
|
||||
const previousReadingMode = useRef<IReaderSettingsWithDefaultFlag['readingMode']>(undefined);
|
||||
const previousTapZoneLayout = useRef<IReaderSettingsWithDefaultFlag['tapZoneLayout']>(undefined);
|
||||
const previousTapZoneInvertMode = useRef<IReaderSettingsWithDefaultFlag['tapZoneInvertMode']>(undefined);
|
||||
const isInitialPreview = useRef(true);
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
Reference in New Issue
Block a user