Fixed React warnings
This commit is contained in:
@ -29,8 +29,8 @@ const Collaborators = ({ document }: Props) => {
|
|||||||
<Avatars>
|
<Avatars>
|
||||||
<StyledTooltip tooltip={tooltip} placement="bottom">
|
<StyledTooltip tooltip={tooltip} placement="bottom">
|
||||||
{collaborators.map(user => (
|
{collaborators.map(user => (
|
||||||
<AvatarWrapper>
|
<AvatarWrapper key={user.id}>
|
||||||
<Avatar key={user.id} src={user.avatarUrl} />
|
<Avatar src={user.avatarUrl} />
|
||||||
</AvatarWrapper>
|
</AvatarWrapper>
|
||||||
))}
|
))}
|
||||||
</StyledTooltip>
|
</StyledTooltip>
|
||||||
|
@ -98,13 +98,13 @@ class DocumentPreview extends Component {
|
|||||||
<h3>
|
<h3>
|
||||||
<Highlight text={document.title} highlight={highlight} />
|
<Highlight text={document.title} highlight={highlight} />
|
||||||
{document.starred ? (
|
{document.starred ? (
|
||||||
<a onClick={this.unstar}>
|
<span onClick={this.unstar}>
|
||||||
<StyledStar solid />
|
<StyledStar solid />
|
||||||
</a>
|
</span>
|
||||||
) : (
|
) : (
|
||||||
<a onClick={this.star}>
|
<span onClick={this.star}>
|
||||||
<StyledStar />
|
<StyledStar />
|
||||||
</a>
|
</span>
|
||||||
)}
|
)}
|
||||||
</h3>
|
</h3>
|
||||||
<PublishingInfo
|
<PublishingInfo
|
||||||
|
@ -45,12 +45,18 @@ class Dashboard extends Component {
|
|||||||
{showContent ? (
|
{showContent ? (
|
||||||
<span>
|
<span>
|
||||||
{hasRecentlyViewed && [
|
{hasRecentlyViewed && [
|
||||||
<Subheading>Recently viewed</Subheading>,
|
<Subheading key="viewed">Recently viewed</Subheading>,
|
||||||
<DocumentList documents={documents.recentlyViewed} />,
|
<DocumentList
|
||||||
|
key="viewedDocuments"
|
||||||
|
documents={documents.recentlyViewed}
|
||||||
|
/>,
|
||||||
]}
|
]}
|
||||||
{hasRecentlyEdited && [
|
{hasRecentlyEdited && [
|
||||||
<Subheading>Recently edited</Subheading>,
|
<Subheading key="edited">Recently edited</Subheading>,
|
||||||
<DocumentList documents={documents.recentlyEdited} />,
|
<DocumentList
|
||||||
|
key="editedDocuments"
|
||||||
|
documents={documents.recentlyEdited}
|
||||||
|
/>,
|
||||||
]}
|
]}
|
||||||
</span>
|
</span>
|
||||||
) : (
|
) : (
|
||||||
|
Reference in New Issue
Block a user