fix(locale): Remove hard coded string literals (#3333)
This commit is contained in:
@ -69,6 +69,7 @@ const AuthenticationPage = ({
|
||||
renderPageContent,
|
||||
logoUrl,
|
||||
siteUrl,
|
||||
t,
|
||||
}) => {
|
||||
return (
|
||||
<StyledAuthenticationPage>
|
||||
@ -80,7 +81,7 @@ const AuthenticationPage = ({
|
||||
{renderButtonContent()}
|
||||
</LoginButton>
|
||||
)}
|
||||
{siteUrl && <GoBackButton href={siteUrl} />}
|
||||
{siteUrl && <GoBackButton href={siteUrl} t={t} />}
|
||||
{logoUrl ? <NetlifyCreditIcon size="100px" type="netlify-cms" /> : null}
|
||||
</StyledAuthenticationPage>
|
||||
);
|
||||
@ -94,6 +95,7 @@ AuthenticationPage.propTypes = {
|
||||
loginErrorMessage: PropTypes.node,
|
||||
renderButtonContent: PropTypes.func,
|
||||
renderPageContent: PropTypes.func,
|
||||
t: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
export default AuthenticationPage;
|
||||
|
@ -1,5 +1,6 @@
|
||||
import styled from '@emotion/styled';
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import { colorsRaw } from './styles.js';
|
||||
import Icon from './Icon';
|
||||
@ -20,11 +21,18 @@ const ButtonText = styled.p`
|
||||
`;
|
||||
|
||||
export default class GoBackButton extends React.Component {
|
||||
static propTypes = {
|
||||
href: PropTypes.string.isRequired,
|
||||
t: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
render() {
|
||||
const { href, t } = this.props;
|
||||
|
||||
return (
|
||||
<GoBackButtonStyle href={this.props.href}>
|
||||
<GoBackButtonStyle href={href}>
|
||||
<Icon type="arrow" size="small" />
|
||||
<ButtonText>Go back to site</ButtonText>
|
||||
<ButtonText>{t('ui.default.goBackToSite')}</ButtonText>
|
||||
</GoBackButtonStyle>
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user