mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-09-01 19:49:54 +02:00
web: fix blank notes screen on screen resize
This commit is contained in:
@@ -56,6 +56,8 @@ function CachedRouter() {
|
||||
route.remove();
|
||||
route = undefined;
|
||||
}
|
||||
} else {
|
||||
cache[key] = false;
|
||||
}
|
||||
|
||||
if (!cache[key]) {
|
||||
|
||||
@@ -62,8 +62,7 @@ export default function useSlider(sliderId, { onSliding, onChange }) {
|
||||
|
||||
const slideToIndex = useCallback(
|
||||
(index) => {
|
||||
console.log(index, slides, ref.current, slides[index].node);
|
||||
if (!ref.current || index >= slides.length) return;
|
||||
if (!slides || !ref.current || index >= slides.length) return;
|
||||
setTimeout(() => {
|
||||
slides[index].node.scrollIntoView();
|
||||
}, 100);
|
||||
|
||||
Reference in New Issue
Block a user