From 726ee586b02c05a58ddfc94516b0d0610da125e3 Mon Sep 17 00:00:00 2001 From: Francis Cao Date: Tue, 31 Mar 2026 13:17:33 -0700 Subject: [PATCH] sharePage hotfix --- .../[websiteId]/sessions/SessionsDataTable.tsx | 12 ++++++++++-- .../[websiteId]/sessions/SessionsTable.tsx | 17 +++++++++-------- src/app/share/[slug]/[[...path]]/SharePage.tsx | 2 +- 3 files changed, 20 insertions(+), 11 deletions(-) diff --git a/src/app/(main)/websites/[websiteId]/sessions/SessionsDataTable.tsx b/src/app/(main)/websites/[websiteId]/sessions/SessionsDataTable.tsx index 4b07a16c7..b4714b430 100644 --- a/src/app/(main)/websites/[websiteId]/sessions/SessionsDataTable.tsx +++ b/src/app/(main)/websites/[websiteId]/sessions/SessionsDataTable.tsx @@ -1,14 +1,22 @@ import { DataGrid } from '@/components/common/DataGrid'; -import { useWebsiteSessionsQuery } from '@/components/hooks'; +import { useNavigation, useWebsiteSessionsQuery } from '@/components/hooks'; import { SessionsTable } from './SessionsTable'; export function SessionsDataTable({ websiteId }: { websiteId: string }) { const queryResult = useWebsiteSessionsQuery(websiteId); + const { pathname } = useNavigation(); + const isSharePage = pathname.includes('/share/'); return ( {({ data }) => { - return ; + return ( + undefined : undefined} + /> + ); }} ); diff --git a/src/app/(main)/websites/[websiteId]/sessions/SessionsTable.tsx b/src/app/(main)/websites/[websiteId]/sessions/SessionsTable.tsx index b4c684a47..69f32afa7 100644 --- a/src/app/(main)/websites/[websiteId]/sessions/SessionsTable.tsx +++ b/src/app/(main)/websites/[websiteId]/sessions/SessionsTable.tsx @@ -16,15 +16,16 @@ export function SessionsTable({ return ( - {(row: any) => ( - + {(row: any) => { + const href = getSessionHref ? getSessionHref(row) : `/websites/${websiteId}/sessions/${row.id}`; + return href ? ( + + + + ) : ( - - )} + ); + }} diff --git a/src/app/share/[slug]/[[...path]]/SharePage.tsx b/src/app/share/[slug]/[[...path]]/SharePage.tsx index f066940dc..4131521d8 100644 --- a/src/app/share/[slug]/[[...path]]/SharePage.tsx +++ b/src/app/share/[slug]/[[...path]]/SharePage.tsx @@ -118,7 +118,7 @@ export function SharePage() { - +