refactor: remove realtime visitors detail page

Remove the individual session journey page and make the live visitor
count a static indicator. Prepares for the new aggregated User Journeys
feature (v0.17).
This commit is contained in:
Usman Baig
2026-03-12 20:45:58 +01:00
parent bae492e8d9
commit 6964be9610
10 changed files with 11 additions and 445 deletions

View File

@@ -1,19 +1,11 @@
'use client'
import { useRouter } from 'next/navigation'
interface RealtimeVisitorsProps {
count: number
siteId?: string
}
export default function RealtimeVisitors({ count, siteId }: RealtimeVisitorsProps) {
const router = useRouter()
export default function RealtimeVisitors({ count }: RealtimeVisitorsProps) {
return (
<div
onClick={() => siteId && router.push(`/sites/${siteId}/realtime`)}
className={`bg-white dark:bg-neutral-900 border border-neutral-200 dark:border-neutral-800 rounded-2xl p-6 ${siteId ? 'cursor-pointer hover:border-neutral-300 dark:hover:border-neutral-700 transition-colors' : ''}`}
<div
className="bg-white dark:bg-neutral-900 border border-neutral-200 dark:border-neutral-800 rounded-2xl p-6"
>
<div className="flex items-center justify-between mb-2">
<div className="text-sm text-neutral-600 dark:text-neutral-400">

View File

@@ -26,7 +26,7 @@ export default function SiteNav({ siteId }: SiteNavProps) {
const isActive = (href: string) => {
if (href === `/sites/${siteId}`) {
return pathname === href || pathname === `${href}/realtime`
return pathname === href
}
return pathname.startsWith(href)
}