UI fix some crashes in replay
This commit is contained in:
parent
17057fb6a1
commit
506a944403
3 changed files with 12 additions and 2 deletions
|
|
@ -17,7 +17,9 @@ function LiveSession({
|
|||
const { integrationsStore, sessionStore } = useStore();
|
||||
const session = sessionStore.current;
|
||||
const fetchFailed = sessionStore.fetchFailed;
|
||||
const clearCurrentSession = sessionStore.clearCurrentSession;
|
||||
const fetchSlackList = integrationsStore.slack.fetchIntegrations;
|
||||
const fetchSession = sessionStore.fetchSessionData;
|
||||
const [initialLoading, setInitialLoading] = React.useState(true);
|
||||
usePageTitle('OpenReplay Assist');
|
||||
|
||||
|
|
@ -32,7 +34,7 @@ function LiveSession({
|
|||
|
||||
useEffect(() => {
|
||||
if (sessionId != null) {
|
||||
fetchSession(sessionId, true);
|
||||
void fetchSession(sessionId, true);
|
||||
} else {
|
||||
console.error('No sessionID in route.');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ function EventGroupWrapper(props) {
|
|||
event={event}
|
||||
onClick={onEventClick}
|
||||
selected={isSelected}
|
||||
showLoadInfo={showLoadInfo}
|
||||
showLoadInfo
|
||||
isCurrent={isCurrent}
|
||||
presentInSearch={presentInSearch}
|
||||
isLastInGroup={isLastInGroup}
|
||||
|
|
|
|||
|
|
@ -12,6 +12,14 @@ function EventsList({ scale }: { scale: number }) {
|
|||
return Object.values(tabStates)[0]?.eventList.filter(e => e.time) || [];
|
||||
}, [eventCount]);
|
||||
|
||||
React.useEffect(() => {
|
||||
const hasDuplicates = events.some((e, i) => {
|
||||
return events.findIndex((el) => el.key === e.key && el.time === e.time) !== i;
|
||||
})
|
||||
if (hasDuplicates) {
|
||||
console.error('Duplicate events detected in list', events);
|
||||
}
|
||||
}, [eventCount])
|
||||
return (
|
||||
<>
|
||||
{events.map((e) => (
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue