mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-14 09:37:37 +02:00
Update edit button and header language drop down
This commit is contained in:
parent
f622bf17d2
commit
b2be3331cf
2 changed files with 23 additions and 8 deletions
|
@ -26,6 +26,17 @@ class Doc extends React.Component {
|
|||
>
|
||||
Edit this Doc
|
||||
</a>;
|
||||
if (this.props.language != "en") {
|
||||
editLink =
|
||||
this.props.config.recruitingLink &&
|
||||
<a
|
||||
className="edit-page-link button"
|
||||
href={this.props.config.recruitingLink + "/" + this.props.language}
|
||||
target="_blank"
|
||||
>
|
||||
Translate this Doc
|
||||
</a>;
|
||||
}
|
||||
return (
|
||||
<div className="post">
|
||||
<header className="postHeader">
|
||||
|
|
|
@ -33,6 +33,11 @@ class LanguageDropDown extends React.Component {
|
|||
);
|
||||
});
|
||||
|
||||
if (enabledLanguages.length < 1) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (siteConfig.recruitingLink) {
|
||||
enabledLanguages.push(
|
||||
<li key="recruiting">
|
||||
<a href={siteConfig.recruitingLink} target="_blank">
|
||||
|
@ -40,9 +45,8 @@ class LanguageDropDown extends React.Component {
|
|||
</a>
|
||||
</li>
|
||||
);
|
||||
if (enabledLanguages.length <= 1) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<span>
|
||||
<li>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue