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]
|
[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) {
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue