quran.com-frontend
quran.com-frontend copied to clipboard
Unable to turn of all translations
It's not possible to remove/turn off all translations.
When you remove Translations using "Remove All" button

When you choose a translation.

Is this Issue still open ??
@bahaa96 yes
Haven't had time to fully look at this bug but FYI to anyone looking at it, the issue goes away if you change:
https://github.com/quran/quran.com-frontend/blob/c4e2d9943c980e71ab63f6cf43f82dbc6763c6b4/src/redux/actions/verses.js#L20-L22
from
const defaultOptions = {
translations: [102]
};
to
const defaultOptions = {
translations: []
};
I'm not sure what else breaks when you do this. It seems like an issue in the prepareParams function if translations is empty because it doesn't handle the empty case in the if statement.
But we want to show default translation when user load the page initially.
Yes my note above isn't a fix. Just wanted to jot down a note so that if someone else picks this up they know where to start looking.
I can pick it up soon
- when deactivated, translations defaults back to 'sahih international'
- on page reload first page is loaded without translations
- scrolling down loads verses with default 'sahih international' translation
- behavior is correct if set to another translation as said above seems empty translation setting is only taken into consideration with first loaded page