Skip to content

Commit

Permalink
i18n Login page
Browse files Browse the repository at this point in the history
  • Loading branch information
juliaqiuxy committed Jul 11, 2020
1 parent b4faa6e commit 791779d
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 15 deletions.
23 changes: 19 additions & 4 deletions src/components/LogIn/LogIn.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import Router, { useRouter } from 'next/router';
import getConfig from 'next/config';
import Link from 'next/link';

import { FormattedMessage } from 'react-intl';

import Avatar from '../Avatar/Avatar';
import AnchorButton from '../Clickable/AnchorButton';
import ButtonAnchor from '../Clickable/ButtonAnchor';
Expand Down Expand Up @@ -155,7 +157,11 @@ const LogIn = ({ user }) => {
user ? (
<>
<Title>
Welcome back,
<FormattedMessage
id="login-welcome-text"
defaultMessage="Welcome back"
/>
,
{' '}
{user.metadata.linkedInProfile.firstName}
!
Expand All @@ -174,7 +180,10 @@ const LogIn = ({ user }) => {
</>
) : (
<Title>
You must sign in to continue
<FormattedMessage
id="login-title"
defaultMessage="You must sign in to continue"
/>
</Title>
)
}
Expand All @@ -195,7 +204,10 @@ const LogIn = ({ user }) => {
<LogOutButtonAnchor
user={user}
>
Log in
<FormattedMessage
id="login-button-login"
defaultMessage="Log in"
/>
</LogOutButtonAnchor>
</Link>
) : (
Expand All @@ -211,7 +223,10 @@ const LogIn = ({ user }) => {
);
}}
>
Log in with LinkedIn
<FormattedMessage
id="login-button-login-with-linkedin"
defaultMessage="Log in with LinkedIn"
/>
</LinkedInButton>
)
}
Expand Down
Loading

0 comments on commit 791779d

Please sign in to comment.