Skip to content

Commit

Permalink
fix(ErrorPage): Inconsistent back button translation
Browse files Browse the repository at this point in the history
  • Loading branch information
3y3k0 authored and 3y3 committed Jul 6, 2023
1 parent 518599d commit b7f93e5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/ErrorPage/ErrorPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ const ErrorPage = ({
receiveAccessUrl,
pageGroup,
}: ErrorPagePropsInnerProps): JSX.Element => {
if (i18n.language !== lang) {
i18n.changeLanguage(lang);
}

let title;
let description;
const href = homeUrl || '/';
Expand All @@ -38,10 +42,6 @@ const ErrorPage = ({
</Link>
);

if (i18n.language !== lang) {
i18n.changeLanguage(lang);
}

switch (code) {
case ERROR_CODES.ACCESS_DENIED:
title = pageGroup ? t('label_title-403_page-group') : t('label_title-403_project');
Expand Down

0 comments on commit b7f93e5

Please sign in to comment.