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

View File

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

View File

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