diff --git a/packages/code-du-travail-frontend/src/common/Answer.js b/packages/code-du-travail-frontend/src/common/Answer.js index 4db69fd14d5..92e79e92bf0 100644 --- a/packages/code-du-travail-frontend/src/common/Answer.js +++ b/packages/code-du-travail-frontend/src/common/Answer.js @@ -3,6 +3,9 @@ import Head from "next/head"; import { Container, Alert, Article, NoAnswer, Button } from "@cdt/ui"; import { withRouter } from "next/router"; import ReactPiwik from "react-piwik"; +import styled from "styled-components"; + +import { Link } from "../../routes"; import Disclaimer from "../common/Disclaimer"; import Html from "../common/Html"; import Search from "../search/Search"; @@ -14,6 +17,13 @@ const BigError = ({ children }) => ( ); +// manuC: Doing this feels stange, we should talk about it +// https://github.com/SocialGouv/code-du-travail-numerique/issues/541 +const StyledAnchor = styled.a` + padding-left: 1.25rem; /* thanks IE11 */ + padding-left: var(--spacing-medium); +`; + class Answer extends React.Component { state = { modalVisible: false @@ -64,6 +74,11 @@ class Answer extends React.Component { {title} + {router.query.q && ( + + {"< Retour aux résultats de recherche"} + + )} {!html && !children && {emptyMessage}} {(html || children) && ( diff --git a/packages/code-du-travail-frontend/src/common/__tests__/__snapshots__/Answer.test.js.snap b/packages/code-du-travail-frontend/src/common/__tests__/__snapshots__/Answer.test.js.snap index 04ea7fb5eef..d599db3e350 100644 --- a/packages/code-du-travail-frontend/src/common/__tests__/__snapshots__/Answer.test.js.snap +++ b/packages/code-du-travail-frontend/src/common/__tests__/__snapshots__/Answer.test.js.snap @@ -280,7 +280,7 @@ exports[` should display feedback modal when click on feedback button est prévue pour 2020.
html @@ -759,7 +759,7 @@ exports[` should display feedback modal when click on thumbDown 1`] = est prévue pour 2020.
html @@ -1253,7 +1253,7 @@ exports[` should render 1`] = `
intro de l'article

should render additional content 1`] = ` est prévue pour 2020.

html