fix: handle profiles which are not identified but the event has profile_id

This commit is contained in:
Carl-Gerhard Lindesvärd
2025-11-03 22:04:13 +01:00
parent c67f7f9578
commit 7287a05697
3 changed files with 9 additions and 13 deletions

View File

@@ -5,6 +5,7 @@ import { formatDateTime } from '@/utils/date';
import { parseAsStringEnum, useQueryState } from 'nuqs';
import type { IServiceEvent, IServiceProfile } from '@openpanel/db';
import { FullPageEmptyState } from '../full-page-empty-state';
import { WidgetButtons, WidgetHead } from '../overview/overview-widget';
type Props = {
@@ -44,7 +45,7 @@ export const ProfileProperties = ({ profile }: Props) => {
</WidgetButtons>
</WidgetHead>
{tab === 'profile' && (
{tab === 'profile' && profile && (
<KeyValueGrid
copyable
className="border-0"
@@ -92,7 +93,7 @@ export const ProfileProperties = ({ profile }: Props) => {
/>
)}
{tab === 'properties' && (
{tab === 'properties' && profile && (
<KeyValueGrid
copyable
className="border-0"
@@ -109,6 +110,9 @@ export const ProfileProperties = ({ profile }: Props) => {
}))}
/>
)}
{(!profile || !profile.properties) && (
<FullPageEmptyState title="No properties found" />
)}
</Widget>
);
};