Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.

Commit

Permalink
footer language : default to EN (#581)
Browse files Browse the repository at this point in the history
Summary:
Hi

Looks like in some cases the `language` is not defined which result in 404 links.

<img width="398" alt="capture d ecran 2018-07-23 a 00 24 32" src="https://user-images.githubusercontent.com/124937/43050768-e1209046-8e0e-11e8-8510-beed7b549633.png">

This fix defaults the language to `en`
Pull Request resolved: #581

Reviewed By: piotr-bojanowski

Differential Revision: D13397407

Pulled By: Celebio

fbshipit-source-id: 5604039e9a4104ecadfbd8978ffe5a15317e5c56
  • Loading branch information
Julien Bouquillon authored and facebook-github-bot committed Dec 20, 2018
1 parent 7842495 commit 3c4a3ea
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions website/core/Footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const githubButton = (

class Footer extends React.Component {
render() {
const language = this.props.language || "en";
const currentYear = new Date().getFullYear();
return (
<footer className="nav-footer" id="footer">
Expand All @@ -38,7 +39,7 @@ class Footer extends React.Component {
<h5>Support</h5>
<a
href={
this.props.config.baseUrl + "docs/" + this.props.language + "/support.html"
this.props.config.baseUrl + "docs/" + language + "/support.html"
}
>
Getting Started
Expand All @@ -47,7 +48,7 @@ class Footer extends React.Component {
href={
this.props.config.baseUrl +
"docs/" +
this.props.language +
language +
"/supervised-tutorial.html"
}
>
Expand All @@ -57,7 +58,7 @@ class Footer extends React.Component {
href={
this.props.config.baseUrl +
"docs/" +
this.props.language +
language +
"/faqs.html"
}
>
Expand All @@ -67,7 +68,7 @@ class Footer extends React.Component {
href={
this.props.config.baseUrl +
"docs/" +
this.props.language +
language +
"/api.html"
}
>
Expand Down

0 comments on commit 3c4a3ea

Please sign in to comment.