1
0
Fork 0
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:
Fedor Katurov 2022-06-20 10:42:08 +07:00
parent 254f9c7af0
commit 2c39fcda25
2 changed files with 8 additions and 5 deletions

View file

@ -53,11 +53,10 @@ const NodeImageSwiperBlock: FC<IProps> = observer(({ node }) => {
[images, controlledSwiper, showPhotoSwiper] [images, controlledSwiper, showPhotoSwiper]
); );
// TODO: remove it if swiper 8 fixed sliding to first slide on init useEffect(() => {
// useEffect(() => { controlledSwiper?.slideTo(0, 0);
// controlledSwiper?.slideTo(0, 0); return () => controlledSwiper?.slideTo(0, 0);
// return () => controlledSwiper?.slideTo(0, 0); }, [images, node?.id]);
// }, [images, node?.id]);
useEffect(() => { useEffect(() => {
if (isModalActive) { if (isModalActive) {

View file

@ -7,6 +7,10 @@
justify-content: center; justify-content: center;
width: 100%; width: 100%;
:global(.swiper) {
width: 100%;
}
:global(.swiper-pagination) { :global(.swiper-pagination) {
left: 50%; left: 50%;
bottom: $gap * 2; bottom: $gap * 2;