Closed a-tokyo closed 2 years ago
Hi @A-Tokyo thanks for reporting this! This was likely introduced in https://github.com/bndw/wifi-card/pull/168
Proposed solution:
– In App.js we need to have an effect that runs on initial load and sets the direction for the whole App, not just settings component
I agree, since App.js is responsible for the state and rendering the children (card, settings) components, that's the right place to do the initial direction setting. Right now both components are getting the majority of their state through the settings
prop, so that might be the best place to track the initial rtl
state, instead of adding a new direction
prop to both components.
Description:
– After the recent changes to
htmlDirection
, the initial load of the page no longer respects language direction Screenshot of broken code:Screenshot of working code: (happens if I change language to another language then back to an rtl language)
Proposed solution:
– In App.js we need to have an effect that runs on initial load and sets the direction for the whole App, not just settings component