mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-24 20:36:40 +07:00
made Swiper slide to first slide faster
This commit is contained in:
parent
e9a66ca0b7
commit
c33e417cbb
1 changed files with 3 additions and 1 deletions
|
@ -52,7 +52,8 @@ const NodeImageSwiperBlock: FC<IProps> = ({ node }) => {
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
controlledSwiper?.slideTo(0, 0);
|
controlledSwiper?.slideTo(0, 0);
|
||||||
}, [images]);
|
return () => controlledSwiper?.slideTo(0, 0);
|
||||||
|
}, [images, node?.id]);
|
||||||
|
|
||||||
if (!images?.length) {
|
if (!images?.length) {
|
||||||
return null;
|
return null;
|
||||||
|
@ -82,6 +83,7 @@ const NodeImageSwiperBlock: FC<IProps> = ({ node }) => {
|
||||||
centeredSlides
|
centeredSlides
|
||||||
observeSlideChildren
|
observeSlideChildren
|
||||||
observeParents
|
observeParents
|
||||||
|
observer
|
||||||
resizeObserver
|
resizeObserver
|
||||||
watchOverflow
|
watchOverflow
|
||||||
updateOnImagesReady
|
updateOnImagesReady
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue