mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-24 20:36:40 +07:00
fixed swiper default width to 100%
This commit is contained in:
parent
254f9c7af0
commit
2c39fcda25
2 changed files with 8 additions and 5 deletions
|
@ -53,11 +53,10 @@ const NodeImageSwiperBlock: FC<IProps> = observer(({ node }) => {
|
|||
[images, controlledSwiper, showPhotoSwiper]
|
||||
);
|
||||
|
||||
// TODO: remove it if swiper 8 fixed sliding to first slide on init
|
||||
// useEffect(() => {
|
||||
// controlledSwiper?.slideTo(0, 0);
|
||||
// return () => controlledSwiper?.slideTo(0, 0);
|
||||
// }, [images, node?.id]);
|
||||
useEffect(() => {
|
||||
controlledSwiper?.slideTo(0, 0);
|
||||
return () => controlledSwiper?.slideTo(0, 0);
|
||||
}, [images, node?.id]);
|
||||
|
||||
useEffect(() => {
|
||||
if (isModalActive) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue