Skip to content

Commit

Permalink
[ErrorPage]: rename supportLink to supportMessage. Don't render block…
Browse files Browse the repository at this point in the history
… if this text doesn't provided.
  • Loading branch information
AlekseyManetov committed Dec 12, 2024
1 parent 5c69533 commit 39b7e6a
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import '@epam/assets/theme/theme_eduverse_light.scss';
import '@epam/assets/theme/theme_eduverse_dark.scss';
import './index.module.scss';

i18n.errorHandler.supportLink = (
i18n.errorHandler.supportMessage = (
<>
You can track the service availability at
{' '}
Expand Down
2 changes: 1 addition & 1 deletion changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
```
import { i18n } from '@epam/uui';
i18n.errorHandler.supportLink = (
i18n.errorHandler.supportMessage = (
<>
You can track the service availability at
{' '}
Expand Down
2 changes: 1 addition & 1 deletion uui/components/errors/ErrorPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const ErrorPage: React.FC<ErrorPageProps> = (props) => {
<img className="uui-error-image" src={ isMobileScreen && props.mobileImageUrl ? props.mobileImageUrl : props.imageUrl } alt="ERROR OCCURRED!" />
<div className="uui-error-title">{props.title}</div>
<div className="uui-error-subtitle">{props.subtitle}</div>
<div className="uui-error-support-link">{props?.supportLink}</div>
{ props?.supportLink && <div className="uui-error-support-link">{props?.supportLink}</div> }
</div>
</div>
);
Expand Down
6 changes: 3 additions & 3 deletions uui/components/errors/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,20 @@ export const getErrorPageConfig = () => ({
mobileImageUrl: 'https://static.cdn.epam.com/uploads/690afa39a93c88c4dd13758fe1d869d5/EPM-UUI/error-pages-illustrations/L_Error_500_Monochrome.svg',
title: i18n.errorHandler.errorPageConfig.serverError.title,
subtitle: i18n.errorHandler.errorPageConfig.serverError.subtitle,
supportLink: i18n.errorHandler.supportLink,
supportLink: i18n.errorHandler.supportMessage,
},
serviceUnavailable: {
imageUrl: 'https://static.cdn.epam.com/uploads/690afa39a93c88c4dd13758fe1d869d5/EPM-UUI/error-pages-illustrations/L_Error_503_Monochrome.svg',
mobileImageUrl: 'https://static.cdn.epam.com/uploads/690afa39a93c88c4dd13758fe1d869d5/EPM-UUI/error-pages-illustrations/L_Error_503_Monochrome.svg',
title: i18n.errorHandler.errorPageConfig.serviceUnavailable.title,
subtitle: i18n.errorHandler.errorPageConfig.serviceUnavailable.subtitle,
supportLink: i18n.errorHandler.supportLink,
supportLink: i18n.errorHandler.supportMessage,
},
default: {
imageUrl: 'https://static.cdn.epam.com/uploads/690afa39a93c88c4dd13758fe1d869d5/EPM-UUI/error-pages-illustrations/L_Empty_Monochrome.svg',
mobileImageUrl: 'https://static.cdn.epam.com/uploads/690afa39a93c88c4dd13758fe1d869d5/EPM-UUI/error-pages-illustrations/L_Empty_Monochrome.svg',
title: i18n.errorHandler.errorPageConfig.default.title,
subtitle: i18n.errorHandler.errorPageConfig.default.subtitle,
supportLink: i18n.errorHandler.supportLink,
supportLink: i18n.errorHandler.supportMessage,
},
});
2 changes: 1 addition & 1 deletion uui/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ const TREE_SHAKEABLE_INIT = () => ({
subtitle: 'We are trying to recover. Please wait.',
},
},
supportLink: undefined as ReactNode,
supportMessage: undefined as ReactNode,
},
});

Expand Down

0 comments on commit 39b7e6a

Please sign in to comment.