performance enhancements

This commit is contained in:
cv
2021-05-02 15:05:32 +02:00
parent 7f94907056
commit 9715e13152
11 changed files with 137 additions and 63 deletions
@@ -1,6 +1,6 @@
import style from './List.module.css';
import { useEffect, useState } from 'react';
import { Fragment, useEffect, useState } from 'react';
import { useSocket } from '../../../app/context/socketContext';
import tinykeys from 'tinykeys';
import Empty from '../../../common/state/Empty';
@@ -111,7 +111,7 @@ export default function EventList(props) {
if (e.type === 'delay') cumulativeDelay += e.duration;
else if (e.type === 'block') cumulativeDelay = 0;
return (
<div key={index}>
<Fragment key={index}>
<EventListItem
type={e.type}
index={index}
@@ -132,7 +132,7 @@ export default function EventList(props) {
/>
)}
</AnimatePresence>
</div>
</Fragment>
);
})}
</div>