Images do not display on sliders (swiper) when switch direction based on react-intl

Viewed 227

I am using react-intl to change the local language and as one of the languages needs to be 'rtl', I used a solution mentioned in a question.

dir={intl.locale === 'en-US' ? 'ltr' : 'rtl'}

However, when the direction is switched to 'rtl', images do not display on swiper sliders. is there a way to fix it?

Thanks

1 Answers

I found the answer. If you ever faced such a problem, the only thing to do is to give your swiper style={{ direction: "ltr" }}

Related