Fix key in SessionActivity

There is no eventId
This commit is contained in:
Harry Oosterveen 2025-03-12 17:59:08 +01:00
parent 38ab685143
commit 32d44e6c65

View file

@ -27,16 +27,16 @@ export function SessionActivity({
return ( return (
<div className={styles.timeline}> <div className={styles.timeline}>
{data.map(({ eventId, createdAt, urlPath, eventName, visitId }) => { {data.map(({ id, createdAt, urlPath, eventName, visitId }) => {
const showHeader = !lastDay || !isSameDay(new Date(lastDay), new Date(createdAt)); const showHeader = !lastDay || !isSameDay(new Date(lastDay), new Date(createdAt));
lastDay = createdAt; lastDay = createdAt;
return ( return (
<Fragment key={eventId}> <Fragment key={id}>
{showHeader && ( {showHeader && (
<div className={styles.header}>{formatTimezoneDate(createdAt, 'PPPP')}</div> <div className={styles.header}>{formatTimezoneDate(createdAt, 'PPPP')}</div>
)} )}
<div key={eventId} className={styles.row}> <div className={styles.row}>
<div className={styles.time}> <div className={styles.time}>
<StatusLight color={`#${visitId?.substring(0, 6)}`}> <StatusLight color={`#${visitId?.substring(0, 6)}`}>
{formatTimezoneDate(createdAt, 'h:mm:ss aaa')} {formatTimezoneDate(createdAt, 'h:mm:ss aaa')}