Skip to content

Commit

Permalink
fix(frontend): correct footer github link (#393)
Browse files Browse the repository at this point in the history
  • Loading branch information
douglasduteil authored Dec 19, 2018
1 parent e3115a9 commit ae83c05
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/code-du-travail-frontend/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ module.exports = withCSS({
publicRuntimeConfig: {
API_URL: process.env.API_URL || "http://127.0.0.1:1337/api/v1",
API_ADDRESS: "https://api-adresse.data.gouv.fr/search",
PACKAGE_VERSION: require('./package.json').version,
SENTRY_PUBLIC_DSN: process.env.SENTRY_PUBLIC_DSN,
PIWIK_URL: process.env.PIWIK_URL,
PIWIK_SITE_ID: process.env.PIWIK_SITE_ID,
Expand Down
8 changes: 7 additions & 1 deletion packages/code-du-travail-frontend/src/layout/Footer.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import React from "react";
import getConfig from "next/config";

const { publicRuntimeConfig } = getConfig();

import ConventionModal from "../common/ConventionModal";

Expand All @@ -21,7 +24,10 @@ const Footer = () => (
<ul>
<li>
<a
href="https://github.com/SocialGouv/code-du-travail-html/"
href={
"https://github.com/SocialGouv/code-du-travail-numerique/tree/v" +
publicRuntimeConfig.PACKAGE_VERSION
}
className="external-link__after"
>
Contribuer sur Github
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ exports[`<Footer /> should render 1`] = `
<li>
<a
class="external-link__after"
href="https://github.com/SocialGouv/code-du-travail-html/"
href="https://github.com/SocialGouv/code-du-travail-numerique/tree/vundefined"
>
Contribuer sur Github
</a>
Expand Down

0 comments on commit ae83c05

Please sign in to comment.