Skip to content

Commit

Permalink
вкладка события
Browse files Browse the repository at this point in the history
  • Loading branch information
19893381 authored and 19893381 committed Jul 31, 2024
1 parent 575241b commit 92c9fc5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/pages/Diary/Diary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1268,9 +1268,9 @@ const Diary: FC<IProps> = ({
}
}, [ref])

const tradeEvents = useMemo(() => trades.filter(s => s.symbol === showSymbolModal), [showSymbolModal, trades]);
const tradeEvents = useMemo(() => trades.filter(s => s.symbol === showSymbolModal).sort((a, b) => a.date - b.date), [showSymbolModal, trades]);
const {height} = useWindowDimensions();
const listHeight = useMemo(() => isMobile ? height - 182 : height - 56, [isMobile, height]);
const listHeight = useMemo(() => isMobile ? height - 186 : height - 56, [isMobile, height]);

return (
<div className="Diary">
Expand Down Expand Up @@ -1494,15 +1494,15 @@ const Diary: FC<IProps> = ({
// -webkit-transition: "background-color .2s ease-in",
transition: "background-color .2s ease-in"
}
}} height={listHeight} itemHeight={52} itemKey="id">
}} height={listHeight} itemHeight={48} itemKey="id">
{(getMaxLossTrade =>
<div className="ticker-info" key={getMaxLossTrade.id}>
<div style={{display: 'flex'}}>
<TickerImg getIsinBySymbol={getIsinBySymbol} key={getMaxLossTrade?.symbol} symbol={getMaxLossTrade?.symbol}/>
<div className="ticker_name">
<div className="ticker_name_title">{getMaxLossTrade?.side === 'buy'? 'Покупка' : 'Продажа'} {getMaxLossTrade?.qtyUnits} акций</div>
<div className="ticker_name_description">
{moment(getMaxLossTrade?.openDate).format('DD.MM.YYYY HH:mm:ss')}
{moment(getMaxLossTrade?.date).format('DD.MM.YYYY HH:mm:ss')}
</div>
</div>
</div>
Expand Down

0 comments on commit 92c9fc5

Please sign in to comment.