fix: encode profile ids #280

This commit is contained in:
Carl-Gerhard Lindesvärd
2026-01-22 22:08:32 +01:00
parent 9e5b482447
commit 753d6dce4c
6 changed files with 9 additions and 9 deletions

View File

@@ -106,7 +106,7 @@ export function useColumns() {
if (profile) { if (profile) {
return ( return (
<ProjectLink <ProjectLink
href={`/profiles/${profile.id}`} href={`/profiles/${encodeURIComponent(profile.id)}`}
className="whitespace-nowrap font-medium hover:underline" className="whitespace-nowrap font-medium hover:underline"
> >
{getProfileName(profile)} {getProfileName(profile)}
@@ -117,7 +117,7 @@ export function useColumns() {
if (profileId && profileId !== deviceId) { if (profileId && profileId !== deviceId) {
return ( return (
<ProjectLink <ProjectLink
href={`/profiles/${profileId}`} href={`/profiles/${encodeURIComponent(profileId)}`}
className="whitespace-nowrap font-medium hover:underline" className="whitespace-nowrap font-medium hover:underline"
> >
Unknown Unknown
@@ -128,7 +128,7 @@ export function useColumns() {
if (deviceId) { if (deviceId) {
return ( return (
<ProjectLink <ProjectLink
href={`/profiles/${deviceId}`} href={`/profiles/${encodeURIComponent(deviceId)}`}
className="whitespace-nowrap font-medium hover:underline" className="whitespace-nowrap font-medium hover:underline"
> >
Anonymous Anonymous

View File

@@ -149,7 +149,7 @@ export function useColumns() {
} }
return ( return (
<ProjectLink <ProjectLink
href={`/profiles/${event.profileId}`} href={`/profiles/${encodeURIComponent(event.profileId)}`}
className="inline-flex min-w-full flex-none items-center gap-2" className="inline-flex min-w-full flex-none items-center gap-2"
> >
{event.profileId} {event.profileId}

View File

@@ -20,7 +20,7 @@ export function useColumns(type: 'profiles' | 'power-users') {
const profile = row.original; const profile = row.original;
return ( return (
<ProjectLink <ProjectLink
href={`/profiles/${profile.id}`} href={`/profiles/${encodeURIComponent(profile.id)}`}
className="flex items-center gap-2 font-medium" className="flex items-center gap-2 font-medium"
title={getProfileName(profile, false)} title={getProfileName(profile, false)}
> >

View File

@@ -62,7 +62,7 @@ export function useColumns() {
if (session.profile) { if (session.profile) {
return ( return (
<ProjectLink <ProjectLink
href={`/profiles/${session.profile.id}`} href={`/profiles/${encodeURIComponent(session.profile.id)}`}
className="font-medium" className="font-medium"
> >
{getProfileName(session.profile)} {getProfileName(session.profile)}
@@ -71,7 +71,7 @@ export function useColumns() {
} }
return ( return (
<ProjectLink <ProjectLink
href={`/profiles/${session.profileId}`} href={`/profiles/${encodeURIComponent(session.profileId)}`}
className="font-mono font-medium" className="font-mono font-medium"
> >
{session.profileId} {session.profileId}

View File

@@ -232,7 +232,7 @@ function EventDetailsContent({ id, createdAt, projectId }: Props) {
{profile && ( {profile && (
<ProjectLink <ProjectLink
onClick={() => popModal()} onClick={() => popModal()}
href={`/profiles/${profile.id}`} href={`/profiles/${encodeURIComponent(profile.id)}`}
className="card p-4 py-2 col gap-2 hover:bg-def-100" className="card p-4 py-2 col gap-2 hover:bg-def-100"
> >
<div className="row items-center gap-2 justify-between"> <div className="row items-center gap-2 justify-between">

View File

@@ -25,7 +25,7 @@ const ProfileItem = ({ profile }: { profile: any }) => {
return ( return (
<ProjectLink <ProjectLink
preload={false} preload={false}
href={`/profiles/${profile.id}`} href={`/profiles/${encodeURIComponent(profile.id)}`}
title={getProfileName(profile, false)} title={getProfileName(profile, false)}
className="col gap-2 rounded-lg border p-2 bg-card" className="col gap-2 rounded-lg border p-2 bg-card"
onClick={(e) => { onClick={(e) => {