Simplify selecting zustand store state

This commit is contained in:
schroda
2026-03-11 22:10:34 +01:00
parent 72af9d52d1
commit 1cccd1ea46
24 changed files with 154 additions and 135 deletions

View File

@@ -59,7 +59,7 @@ const BaseReaderNavBarDesktop = ({
setReaderNavBarWidth,
}: ReaderNavBarDesktopProps & Pick<NavbarContextType, 'setReaderNavBarWidth'>) => {
const { t } = useLingui();
const manga = useReaderStore((state) => state.manga);
const manga = useReaderStore('manga');
const {
chapters,
currentChapterId,
@@ -77,7 +77,7 @@ const BaseReaderNavBarDesktop = ({
previousChapter: state.previousChapter,
nextChapter: state.nextChapter,
}));
const isStaticNav = useReaderSettingsStore((state) => state.isStaticNav);
const isStaticNav = useReaderSettingsStore('isStaticNav');
const [navBarElement, setNavBarElement] = useState<HTMLDivElement | null>();
useResizeObserver(