mirror of
https://github.com/filecoin-project/slate.git
synced 2024-12-28 03:25:55 +03:00
patch language switcher bug
This commit is contained in:
parent
9c04d44159
commit
7a2633a1db
@ -115,6 +115,7 @@ export default class APIDocsGetSlate extends React.Component {
|
|||||||
language={language}
|
language={language}
|
||||||
title="Get slate by ID"
|
title="Get slate by ID"
|
||||||
onLanguageChange={this.props.onLanguageChange}
|
onLanguageChange={this.props.onLanguageChange}
|
||||||
|
multiLang="true"
|
||||||
/>
|
/>
|
||||||
<br />
|
<br />
|
||||||
<CodeBlock
|
<CodeBlock
|
||||||
|
@ -326,7 +326,7 @@ class CodeBlock extends React.Component {
|
|||||||
this.props.onLanguageChange(language);
|
this.props.onLanguageChange(language);
|
||||||
};
|
};
|
||||||
render() {
|
render() {
|
||||||
let availableLanguages = Object.keys(this.props.children);
|
let availableLanguages = this.props.multiLang ? Object.keys(this.props.children) : 1;
|
||||||
let showTopBar = this.props.title || availableLanguages.length > 1;
|
let showTopBar = this.props.title || availableLanguages.length > 1;
|
||||||
if (this.props.title) {
|
if (this.props.title) {
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user