Merge pull request #3305 from harryo/bugfix/fix_key

Fix key in SessionActivity
This commit is contained in:
Mike Cao
2025-03-24 20:16:20 -07:00
committed by GitHub

View File

@@ -27,16 +27,16 @@ export function SessionActivity({
return (
<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));
lastDay = createdAt;
return (
<Fragment key={eventId}>
<Fragment key={id}>
{showHeader && (
<div className={styles.header}>{formatTimezoneDate(createdAt, 'PPPP')}</div>
)}
<div key={eventId} className={styles.row}>
<div className={styles.row}>
<div className={styles.time}>
<StatusLight color={`#${visitId?.substring(0, 6)}`}>
{formatTimezoneDate(createdAt, 'pp')}