Skip to content

OpenPanel is an open-source web and product analytics platform, an open-source alternative to Mixpanel with optional self-hosting.

fix(dashboard): fixed minor ui issues and errors

Carl-Gerhard Lindesvärd484639053107
diff --git a/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/profiles/[profileId]/profile-metrics/profile-metrics.tsx b/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/profiles/[profileId]/profile-metrics/profile-metrics.tsx
index 293326bb3..73ec37fd6 100644
--- a/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/profiles/[profileId]/profile-metrics/profile-metrics.tsx
+++ b/apps/dashboard/src/app/(app)/[organizationSlug]/[projectId]/profiles/[profileId]/profile-metrics/profile-metrics.tsx
@@ -27,7 +27,13 @@ function Info({ title, value }: { title: string; value: string }) {
return (
<div className="col gap-2">
<div className="capitalize text-muted-foreground">{title}</div>
- <div className="truncate font-mono">{value || '-'}</div>
+ <div className="truncate font-mono">
+ {value
+ ? typeof value === 'string'
+ ? value
+ : JSON.stringify(value)
+ : '-'}
+ </div>
</div>
);
}
diff --git a/apps/dashboard/src/components/ui/key-value.tsx b/apps/dashboard/src/components/ui/key-value.tsx
index 33aac5f10..aeef479b7 100644
--- a/apps/dashboard/src/components/ui/key-value.tsx
+++ b/apps/dashboard/src/components/ui/key-value.tsx
@@ -23,7 +23,7 @@ export function KeyValue({ href, onClick, name, value }: KeyValueProps) {
<div className="bg-black/5 p-1 px-2 capitalize">{name}</div>
<div
className={cn(
- 'font-mono overflow-hidden text-ellipsis whitespace-nowrap bg-card p-1 px-2 text-highlight',
+ 'font-mono overflow-hidden max-w-[300px] text-ellipsis whitespace-nowrap bg-card p-1 px-2 text-highlight',
clickable && 'group-hover:underline',
)}
>