mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-05 13:17:23 +02:00
Fixes 2 additional console errors. One in HeaderNav and one in Index component.
This commit is contained in:
parent
a83e16308b
commit
89285e7693
2 changed files with 6 additions and 5 deletions
|
@ -61,7 +61,7 @@ class LanguageDropDown extends React.Component {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<span>
|
<span>
|
||||||
<li>
|
<li key="languages">
|
||||||
<a id="languages-menu" href="#">
|
<a id="languages-menu" href="#">
|
||||||
<img
|
<img
|
||||||
className="languages-icon"
|
className="languages-icon"
|
||||||
|
@ -109,7 +109,7 @@ class HeaderNav extends React.Component {
|
||||||
if (link.search && this.props.config.algolia) {
|
if (link.search && this.props.config.algolia) {
|
||||||
// return algolia search bar
|
// return algolia search bar
|
||||||
return (
|
return (
|
||||||
<li className="navSearchWrapper reactNavSearchWrapper">
|
<li className="navSearchWrapper reactNavSearchWrapper" key="search">
|
||||||
<input id="search_input_react" type="text" placeholder="Search" />
|
<input id="search_input_react" type="text" placeholder="Search" />
|
||||||
</li>
|
</li>
|
||||||
);
|
);
|
||||||
|
@ -119,6 +119,7 @@ class HeaderNav extends React.Component {
|
||||||
<LanguageDropDown
|
<LanguageDropDown
|
||||||
baseUrl={this.props.baseUrl}
|
baseUrl={this.props.baseUrl}
|
||||||
language={this.props.language}
|
language={this.props.language}
|
||||||
|
key="languagedropdown"
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
} else if (link.doc) {
|
} else if (link.doc) {
|
||||||
|
@ -157,7 +158,7 @@ class HeaderNav extends React.Component {
|
||||||
href = this.props.baseUrl + "blog";
|
href = this.props.baseUrl + "blog";
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<li>
|
<li key={link.label + "page"}>
|
||||||
<a href={href} target={link.external ? "_blank" : "_self"}>
|
<a href={href} target={link.external ? "_blank" : "_self"}>
|
||||||
{translation[this.props.language]
|
{translation[this.props.language]
|
||||||
? translation[this.props.language]["localized-strings"][link.label]
|
? translation[this.props.language]["localized-strings"][link.label]
|
||||||
|
|
|
@ -76,9 +76,9 @@ class Index extends React.Component {
|
||||||
.filter(user => {
|
.filter(user => {
|
||||||
return user.pinned;
|
return user.pinned;
|
||||||
})
|
})
|
||||||
.map(user => {
|
.map((user, i) => {
|
||||||
return (
|
return (
|
||||||
<a href={user.infoLink}>
|
<a href={user.infoLink} key={i}>
|
||||||
<img src={user.image} title={user.caption} />
|
<img src={user.image} title={user.caption} />
|
||||||
</a>
|
</a>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Reference in a new issue