mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-04 20:57:17 +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 (
|
||||
<span>
|
||||
<li>
|
||||
<li key="languages">
|
||||
<a id="languages-menu" href="#">
|
||||
<img
|
||||
className="languages-icon"
|
||||
|
@ -109,7 +109,7 @@ class HeaderNav extends React.Component {
|
|||
if (link.search && this.props.config.algolia) {
|
||||
// return algolia search bar
|
||||
return (
|
||||
<li className="navSearchWrapper reactNavSearchWrapper">
|
||||
<li className="navSearchWrapper reactNavSearchWrapper" key="search">
|
||||
<input id="search_input_react" type="text" placeholder="Search" />
|
||||
</li>
|
||||
);
|
||||
|
@ -119,6 +119,7 @@ class HeaderNav extends React.Component {
|
|||
<LanguageDropDown
|
||||
baseUrl={this.props.baseUrl}
|
||||
language={this.props.language}
|
||||
key="languagedropdown"
|
||||
/>
|
||||
);
|
||||
} else if (link.doc) {
|
||||
|
@ -157,7 +158,7 @@ class HeaderNav extends React.Component {
|
|||
href = this.props.baseUrl + "blog";
|
||||
}
|
||||
return (
|
||||
<li>
|
||||
<li key={link.label + "page"}>
|
||||
<a href={href} target={link.external ? "_blank" : "_self"}>
|
||||
{translation[this.props.language]
|
||||
? translation[this.props.language]["localized-strings"][link.label]
|
||||
|
|
|
@ -76,9 +76,9 @@ class Index extends React.Component {
|
|||
.filter(user => {
|
||||
return user.pinned;
|
||||
})
|
||||
.map(user => {
|
||||
.map((user, i) => {
|
||||
return (
|
||||
<a href={user.infoLink}>
|
||||
<a href={user.infoLink} key={i}>
|
||||
<img src={user.image} title={user.caption} />
|
||||
</a>
|
||||
);
|
||||
|
|
Loading…
Add table
Reference in a new issue