From 163e46d1f15bd6b4d1bac650cbf8480aa640a2d6 Mon Sep 17 00:00:00 2001 From: Francis Cao Date: Tue, 31 Mar 2026 13:36:23 -0700 Subject: [PATCH] Fix session avatar href --- .../sessions/SessionsDataTable.tsx | 19 ++++++++----------- .../[websiteId]/sessions/SessionsPage.tsx | 2 ++ .../[websiteId]/sessions/SessionsTable.tsx | 13 ++++--------- 3 files changed, 14 insertions(+), 20 deletions(-) diff --git a/src/app/(main)/websites/[websiteId]/sessions/SessionsDataTable.tsx b/src/app/(main)/websites/[websiteId]/sessions/SessionsDataTable.tsx index b4714b430..1b8f441a5 100644 --- a/src/app/(main)/websites/[websiteId]/sessions/SessionsDataTable.tsx +++ b/src/app/(main)/websites/[websiteId]/sessions/SessionsDataTable.tsx @@ -4,20 +4,17 @@ import { SessionsTable } from './SessionsTable'; export function SessionsDataTable({ websiteId }: { websiteId: string }) { const queryResult = useWebsiteSessionsQuery(websiteId); - const { pathname } = useNavigation(); - const isSharePage = pathname.includes('/share/'); + const { updateParams } = useNavigation(); return ( - {({ data }) => { - return ( - undefined : undefined} - /> - ); - }} + {({ data }) => ( + updateParams({ session: row.id })} + /> + )} ); } diff --git a/src/app/(main)/websites/[websiteId]/sessions/SessionsPage.tsx b/src/app/(main)/websites/[websiteId]/sessions/SessionsPage.tsx index adce5ec9c..f891f2ad7 100644 --- a/src/app/(main)/websites/[websiteId]/sessions/SessionsPage.tsx +++ b/src/app/(main)/websites/[websiteId]/sessions/SessionsPage.tsx @@ -5,6 +5,7 @@ import { WebsiteControls } from '@/app/(main)/websites/[websiteId]/WebsiteContro import { Panel } from '@/components/common/Panel'; import { useMessages } from '@/components/hooks'; import { getItem, setItem } from '@/lib/storage'; +import { SessionModal } from './SessionModal'; import { SessionProperties } from './SessionProperties'; import { SessionsDataTable } from './SessionsDataTable'; @@ -22,6 +23,7 @@ export function SessionsPage({ websiteId }) { return ( + diff --git a/src/app/(main)/websites/[websiteId]/sessions/SessionsTable.tsx b/src/app/(main)/websites/[websiteId]/sessions/SessionsTable.tsx index 69f32afa7..1f3d451a7 100644 --- a/src/app/(main)/websites/[websiteId]/sessions/SessionsTable.tsx +++ b/src/app/(main)/websites/[websiteId]/sessions/SessionsTable.tsx @@ -16,16 +16,11 @@ export function SessionsTable({ return ( - {(row: any) => { - const href = getSessionHref ? getSessionHref(row) : `/websites/${websiteId}/sessions/${row.id}`; - return href ? ( - - - - ) : ( + {(row: any) => ( + - ); - }} + + )}