Skip to content

Commit

Permalink
add translations for l2 reminder about signing in
Browse files Browse the repository at this point in the history
17luke committed Aug 14, 2024
1 parent 6507235 commit 6316fa2
Showing 3 changed files with 16 additions and 7 deletions.
4 changes: 4 additions & 0 deletions public/static/locales/eng/l2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"sign-in-hello": "You can track your recordings by signing in or creating an account.",
"sign-in-hello-link": "Click here to sign in or create an account."
}
4 changes: 4 additions & 0 deletions public/static/locales/isl/l2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"sign-in-hello": "Þú getur fylgst með framvindu þinni með því að búa til aðgang.",
"sign-in-hello-link": "Smelltu hér til að skrá þig inn eða búa til aðgang."
}
15 changes: 8 additions & 7 deletions src/components/subpages/l2-sign-in-hello.tsx
Original file line number Diff line number Diff line change
@@ -4,22 +4,25 @@ import RootState from '../../store/root-state';
import Link from 'next/link';
import styled from 'styled-components';
import { StyledLink } from '../ui/links';
import {isCompetition} from "../../utilities/competition-helper";
import { isCompetition } from '../../utilities/competition-helper';
import { useTranslation } from 'react-i18next';

const L2Container = styled.div`
padding-bottom: 2rem;
display: block;
`;

const HelloContainer = styled.div`
border: none;
border: none;
`;

interface Props {
switchUser: () => void;
}

export const L2SignInHello: React.FC<Props> = (props) => {
const { t } = useTranslation('l2');

const {
client: { isAuthenticated, username },
} = useSelector((state: RootState) => state.user);
@@ -28,15 +31,13 @@ export const L2SignInHello: React.FC<Props> = (props) => {
<L2Container>
{!isAuthenticated && (
<HelloContainer>
Þú getur fylgst með framvindu þinni með því að búa til aðgang.
{t('sign-in-hello')}
<br></br>
<Link href={'/innskraning'} passHref>
<StyledLink>
Smelltu hér til að skrá þig inn eða búa til aðgang.
</StyledLink>
<StyledLink>{t('sign-in-hello-link')}</StyledLink>
</Link>
</HelloContainer>
)}
</L2Container>
);
};
};

0 comments on commit 6316fa2

Please sign in to comment.