1-
21import { SyntheticEvent } from 'react' ;
32import { Dimmer , Loader , Popup } from 'semantic-ui-react' ;
43import { FormattedMessage } from 'react-intl' ;
54import InfiniteScroll from 'react-infinite-scroll-component' ;
5+ import TextLimit from 'components/TextLimit' ;
66import classNames from 'classnames' ;
77import dayjs from 'dayjs' ;
88import { IVersion } from 'interfaces/targeting' ;
@@ -16,7 +16,6 @@ interface IProps {
1616 isHistoryLoading : boolean ;
1717 loadMore ( ) : void ;
1818 reviewHistory ( version : IVersion ) : void ;
19- setHistoryOpen ( open : boolean ) : void ;
2019}
2120
2221const History = ( props : IProps ) => {
@@ -50,7 +49,7 @@ const History = (props: IProps) => {
5049 }
5150 >
5251 {
53- versions . length > 0 && versions . map ( ( item : IVersion ) => {
52+ versions . length > 0 && versions . map ( ( item ) => {
5453 const clsRight = classNames (
5554 styles [ 'version-right' ] ,
5655 {
@@ -130,7 +129,7 @@ const History = (props: IProps) => {
130129 />
131130 </ div >
132131 {
133- item . approvalStatus === 'PASS' && (
132+ item . approvalStatus === 'PASS' && typeof item . approvalTime === 'string' && (
134133 < div className = { styles . modifyBy } >
135134 < span className = { styles [ 'version-title' ] } >
136135 < FormattedMessage id = 'approvals.reviewed.by' />
@@ -180,23 +179,10 @@ const History = (props: IProps) => {
180179 {
181180 item . comment && < div className = { styles . comment } >
182181 < span className = { styles [ 'version-title' ] } >
183- < FormattedMessage id = 'targeting.publish.modal.comment' /> :
182+ < FormattedMessage id = 'targeting.publish.modal.comment' />
184183 </ span >
185184 :
186- < Popup
187- inverted
188- style = { { opacity : '0.8' } }
189- className = { styles . popup }
190- trigger = {
191- < span className = { styles [ 'tooltip-text' ] } > { item . comment } </ span >
192- }
193- content = {
194- < div className = { styles . tooltip } >
195- { item . comment }
196- </ div >
197- }
198- position = 'top left'
199- />
185+ < span className = { styles [ 'tooltip-text' ] } > < TextLimit text = { item . comment } /> </ span >
200186 </ div >
201187 }
202188 </ div >
0 commit comments