[Resolved] Avoid showing header avatar on notification box & resolve unique key error in stream component

This commit is contained in:
Qolzam
2018-02-05 10:57:14 +07:00
parent dc2dfdd73f
commit c2fbbf1bcb
3 changed files with 50 additions and 48 deletions

View File

@@ -39,6 +39,9 @@ const styles = (theme: any) => ({
},
popperClose: {
pointerEvents: 'none'
},
popperOpen: {
zIndex: 1
}
})
@@ -121,7 +124,7 @@ export class NotifyComponent extends Component<INotifyComponentProps, INotifyCom
<Popper
placement='bottom-start'
eventsEnabled={open}
className={classNames({ [classes.popperClose]: !open })}
className={classNames({ [classes.popperClose]: !open }, { [classes.popperOpen]: open })}
>
<ClickAwayListener onClickAway={onRequestClose}>

View File

@@ -161,13 +161,13 @@ export class StreamComponent extends Component<IStreamComponentProps,IStreamComp
} else {
postBack.divided = false
}
sortedPosts.forEach((post: any, index: any) => {
sortedPosts.forEach((post: Post, index: any) => {
let newPost: any = (
<div key={post.id}>
<div key={`${post.id!}-stream-div`}>
{index > 1 || (!postBack.divided && index > 0) ? <div style={{ height: '16px' }}></div> : ''}
<PostComponent post={post} />
<PostComponent key={`${post.id!}-stream-div-post`} post={post} />
</div>
)
@@ -211,7 +211,7 @@ export class StreamComponent extends Component<IStreamComponentProps,IStreamComp
loadMore={this.scrollLoad}
hasMore={hasMorePosts}
useWindow={true}
loader={<LoadMoreProgressComponent />}
loader={<LoadMoreProgressComponent key='stream-load-more-progress' />}
>
<div className='grid grid__gutters grid__1of2 grid__space-around animate-top'>
<div className='grid-cell animate-top' style={{ maxWidth: '530px', minWidth: '280px' }}>

View File

@@ -41,8 +41,7 @@
"debug",
"info",
"time",
"timeEnd",
"trace"
"timeEnd"
],
"no-consecutive-blank-lines": true,
"no-construct": true,