Cleanup reader store slices hooks

This commit is contained in:
schroda
2026-02-21 17:33:13 +01:00
parent daeb2a4e45
commit 576cf85c38
27 changed files with 142 additions and 134 deletions

View File

@@ -22,11 +22,11 @@ const CANVAS_ID = 'reader-tap-zone-layout-canvas';
const BaseTapZoneLayout = ({ readerNavBarWidth }: Pick<NavbarContextType, 'readerNavBarWidth'>) => {
const theme = useTheme();
const { tapZoneLayout, tapZoneInvertMode, readingDirection } = useReaderSettingsStore((state) => ({
tapZoneLayout: state.settings.tapZoneLayout.value,
tapZoneInvertMode: state.settings.tapZoneInvertMode.value,
readingDirection: state.settings.readingDirection.value,
tapZoneLayout: state.tapZoneLayout.value,
tapZoneInvertMode: state.tapZoneInvertMode.value,
readingDirection: state.readingDirection.value,
}));
const showPreview = useReaderTapZoneStore((state) => state.tapZone.showPreview);
const showPreview = useReaderTapZoneStore((state) => state.showPreview);
const [width, setWidth] = useState(0);
const [height, setHeight] = useState(0);