Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtemkaDev committed Jun 2, 2024
1 parent 767e23f commit 09ba14f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ const supportedLanguages = ['en', 'ru', 'ua'];

export default function RootPage() {
useEffect(() => {
const userLang = navigator.language || navigator.userLanguage ;
const langPrefix = userLang.split('-')[0];
const langPrefix = navigator.language.split('-')[0];

if (supportedLanguages.includes(langPrefix)) {
redirect(`/${langPrefix}`);
Expand Down

0 comments on commit 09ba14f

Please sign in to comment.