Add dedicated store access util functions

Makes it easier to find the specific store slice usage
This commit is contained in:
schroda
2025-09-21 00:50:19 +02:00
parent ed488f76dd
commit 525173e05e
28 changed files with 247 additions and 161 deletions

View File

@@ -8,7 +8,7 @@
import { MutableRefObject, useEffect } from 'react';
import { TReaderTapZoneContext } from '@/features/reader/tap-zones/TapZoneLayout.types.ts';
import { getReaderStore } from '@/features/reader/stores/ReaderStore.ts';
import { getReaderOverlayStore } from '@/features/reader/stores/ReaderStore.ts';
export const useReaderHideOverlayOnUserScroll = (
isOverlayVisible: boolean,
@@ -19,7 +19,7 @@ export const useReaderHideOverlayOnUserScroll = (
useEffect(() => {
const handleScroll = () => {
if (isOverlayVisible) {
getReaderStore().overlay.setIsVisible(false);
getReaderOverlayStore().setIsVisible(false);
}
if (showPreview) {