diff --git a/src/components/text/BitmapText.jsx b/src/components/text/BitmapText.jsx index 6fee920..8200fff 100644 --- a/src/components/text/BitmapText.jsx +++ b/src/components/text/BitmapText.jsx @@ -13,10 +13,17 @@ export function BitmapText(props) { throw new Error('The message.id must be contain 3 parts separated by dots'); } - const src = require(`emails/${parts[1]}/images/${props.intl.locale}/${parts[2]}.png`); - // TODO: we can improve this loader in future by adding an option to disable file emitting - // because this thing is handled by url-loader - const size = require(`image-size!emails/${parts[1]}/images/${props.intl.locale}/${parts[2]}.png`); + let src; + let size; + try { + src = require(`emails/${parts[1]}/images/${props.intl.locale}/${parts[2]}.png`); + // TODO: we can improve this loader in future by adding an option to disable file emitting + // because this thing is handled by url-loader + size = require(`image-size!emails/${parts[1]}/images/${props.intl.locale}/${parts[2]}.png`); + } catch (err) { // fallback to default locale + src = require(`emails/${parts[1]}/images/${props.intl.defaultLocale}/${parts[2]}.png`); + size = require(`image-size!emails/${parts[1]}/images/${props.intl.defaultLocale}/${parts[2]}.png`); + } const width = props.retina ? size.width / 2 : size.width; const height = props.retina ? size.height / 2 : size.height; @@ -26,7 +33,7 @@ export function BitmapText(props) { {message} } ); @@ -39,11 +46,13 @@ BitmapText.propTypes = { id: PropTypes.string }) ]).isRequired, + style: PropTypes.object, // eslint-disable-line react/forbid-prop-types retina: PropTypes.bool }; BitmapText.defaultProps = { - retina: true + retina: true, + style: {} }; import { injectIntl, intlShape } from 'react-intl'; diff --git a/src/emails/register/Register.jsx b/src/emails/register/Register.jsx index 8135ddc..2415b0e 100644 --- a/src/emails/register/Register.jsx +++ b/src/emails/register/Register.jsx @@ -15,13 +15,6 @@ import violetManImage from './images/violetMan.png'; import orangeManImage from './images/orangeMan.png'; import darkBlueManImage from './images/darkBlueMan.png'; -import confirmEmailImage from './images/ru/confirmEmail.png'; -import whatsNextImage from './images/ru/whatsNext.png'; -import chooseYouSkin from './images/ru/chooseYouSkin.png'; -import installOurPatch from './images/ru/installOurPatch.png'; -import useTLauncher from './images/ru/useTlauncher.png'; -import footerLogoImage from './images/ru/footerLogo.png'; - export default function Register({username, link, code}) { return (
@@ -33,7 +26,9 @@ export default function Register({username, link, code}) {
- + @@ -54,15 +49,9 @@ export default function Register({username, link, code}) { }}> @@ -96,15 +85,9 @@ export default function Register({username, link, code}) { ...styles.contentCenterCell, ...styles.whatsNextText }}> - {/* TODO: текст и картинка */} - {(message) => - {message} - } + @@ -118,15 +101,9 @@ export default function Register({username, link, code}) { }} /> - {/* TODO: текст и картинка */} - {(message) => - {message} - } +
- {/* TODO: текст и картинка */} - {(message) => - {message} - } +
- {/* TODO: текст и картинка */} - {(message) => - {message} - } +
- {/* TODO: текст и картинка */} - {(message) => - {message} - } + diff --git a/src/emails/register/images/be/confirmEmail.png b/src/emails/register/images/be/confirmEmail.png deleted file mode 100644 index d0868fd..0000000 Binary files a/src/emails/register/images/be/confirmEmail.png and /dev/null differ diff --git a/src/emails/register/images/en/confirmEmail.png b/src/emails/register/images/en/confirmEmail.png deleted file mode 100644 index cfcc155..0000000 Binary files a/src/emails/register/images/en/confirmEmail.png and /dev/null differ diff --git a/src/emails/register/images/ru/confirmEmail.png b/src/emails/register/images/ru/confirmEmail.png deleted file mode 100644 index ea6efe9..0000000 Binary files a/src/emails/register/images/ru/confirmEmail.png and /dev/null differ