Skip to content

Commit

Permalink
feat(frontend): add canonical link on service-public and travail-empl…
Browse files Browse the repository at this point in the history
…oi document (#3312)
  • Loading branch information
Lionel authored Feb 17, 2021
1 parent 9c2dc3c commit bf6baa9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Accordion } from "@socialgouv/cdtn-ui";
import { decode } from "@socialgouv/fiches-travail-data";
import fetch from "isomorphic-unfetch";
import getConfig from "next/config";
import Head from "next/head";
import { withRouter } from "next/router";
import React, { useEffect, useState } from "react";
import styled from "styled-components";
Expand Down Expand Up @@ -60,6 +61,9 @@ const Fiche = ({ data = { _source: {} }, anchor }) => {
return (
<Layout>
<Metas title={title} description={description} />
<Head>
<link rel="canonical" href={url} />
</Head>
<StyledAnswer
title={title}
relatedItems={relatedItems}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Container, Section } from "@socialgouv/cdtn-ui";
import { FicheServicePublic } from "@socialgouv/react-fiche-service-public";
import fetch from "isomorphic-unfetch";
import getConfig from "next/config";
import Head from "next/head";
import { withRouter } from "next/router";
import React from "react";

Expand Down Expand Up @@ -48,6 +49,9 @@ class Fiche extends React.Component {
return (
<Layout>
<Metas title={title} description={description} />
<Head>
<link rel="canonical" href={url} />
</Head>
<Answer
title={title}
relatedItems={relatedItems}
Expand Down

0 comments on commit bf6baa9

Please sign in to comment.