Relative Content

Tag Archive for reactjstypescriptnext.jslocalization

Having issue calling property in TypeScript

In my Next.js project, I am encountering an issue when a user selects the Arabic language. Although the translation works fine and the text is correctly translated into Arabic, the layout does not switch from LTR (left-to-right) to RTL (right-to-left) as expected. Specifically, when trying to change the layout direction using the line onChangeDirection(themeDirection.RTL);, I see a red underline under this line with the error message: Property ‘RTL’ does not exist on type ‘ThemeDirection’.ts(2339). This indicates that the ‘RTL’ property is not recognized within the ‘ThemeDirection’ type, causing the layout direction change to fail.