fix(dashboard): event field value cant have key as prop

This commit is contained in:
Carl-Gerhard Lindesvärd
2025-05-14 09:36:28 +02:00
parent e0c356701f
commit 023a2852c7
2 changed files with 6 additions and 6 deletions

View File

@@ -5,11 +5,11 @@ import { isToday } from 'date-fns';
import { SerieIcon } from '../report-chart/common/serie-icon';
export function EventFieldValue({
key,
name,
value,
event,
}: {
key: keyof IServiceEvent;
name: keyof IServiceEvent;
value: any;
event: IServiceEvent;
}) {
@@ -21,7 +21,7 @@ export function EventFieldValue({
return isToday(value) ? formatTime(value) : formatDateTime(value);
}
switch (key) {
switch (name) {
case 'osVersion':
return (
<div className="row gap-2 items-center">

View File

@@ -300,7 +300,7 @@ export default function EventDetails({ id, createdAt, projectId }: Props) {
}}
>
<EventFieldValue
key={item.name}
name={item.name}
value={item.value}
event={event}
/>
@@ -363,7 +363,7 @@ export default function EventDetails({ id, createdAt, projectId }: Props) {
}}
>
<EventFieldValue
key={item.name}
name={item.name}
value={item.value}
event={event}
/>
@@ -374,7 +374,7 @@ export default function EventDetails({ id, createdAt, projectId }: Props) {
return (
<EventFieldValue
key={item.name}
name={item.name}
value={item.value}
event={event}
/>