24 | {(t("current-language-code") === "en"
25 | ? need.nameEn.toUpperCase()
26 | : need.nameFr.toUpperCase()) + (last ? "" : ",")}
27 |
28 | );
29 | }
30 | }
31 |
32 | NeedTag.propTypes = {
33 | need: PropTypes.object.isRequired,
34 | t: PropTypes.func.isRequired,
35 | last: PropTypes.bool
36 | };
37 |
38 | export default NeedTag;
39 |
--------------------------------------------------------------------------------
/components/typography/footer_link.js:
--------------------------------------------------------------------------------
1 | import { Component } from "react";
2 | import PropTypes from "prop-types";
3 | import { globalTheme } from "../../theme";
4 | /** @jsx jsx */
5 | import { css, jsx } from "@emotion/core";
6 |
7 | const style = css`
8 | font-family: ${globalTheme.fontFamilySansSerif};
9 | font-size: 14px;
10 | font-weight: bold;
11 | color: ${globalTheme.colour.white};
12 | margin: 0px;
13 | text-decoration: none;
14 | :hover {
15 | text-decoration: underline;
16 | }
17 | :focus {
18 | outline: 3px solid ${globalTheme.colour.focusColour};
19 | }
20 | `;
21 |
22 | class FooterLink extends Component {
23 | render() {
24 | const { css, children, ...other } = this.props;
25 | return (
26 |
39 |
40 |
41 |
42 | Your current version of this browser is not supported. Please update to
43 | the latest version. To see a list of all benefits click
44 | here.
45 |
46 |
47 | Votre version actuelle de ce navigateur n'est pas supportée. S'il vous
48 | plaît mettre à jour à la dernière version. Pour voir la liste complète
49 | des avantages, cliquez ici.
50 |
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/__tests__/components/layout_test.js:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import Layout from "../../components/layout";
3 | import { mount } from "enzyme";
4 | import translate from "../fixtures/translate";
5 |
6 | const { axe, toHaveNoViolations } = require("jest-axe");
7 | expect.extend(toHaveNoViolations);
8 |
9 | jest.mock("react-ga");
10 |
11 | describe("Layout", () => {
12 | // Setup
13 |
14 | let props;
15 | let _mountedLayout;
16 | const mountedLayout = () => {
17 | if (!_mountedLayout) {
18 | _mountedLayout = mount(