Release 0.14.0-alpha #42

Merged
uz1mani merged 109 commits from staging into main 2026-03-12 12:12:03 +00:00
54 changed files with 5964 additions and 1293 deletions
Showing only changes of commit a9f42acbf6 - Show all commits

View File

@@ -2,7 +2,7 @@
import { logger } from '@/lib/utils/logger' import { logger } from '@/lib/utils/logger'
import { useCallback, useEffect, useState, useMemo } from 'react' import { useCallback, useEffect, useRef, useState, useMemo } from 'react'
import { useParams, useRouter, useSearchParams } from 'next/navigation' import { useParams, useRouter, useSearchParams } from 'next/navigation'
import { import {
getPerformanceByPage, getPerformanceByPage,
@@ -99,7 +99,7 @@ export default function SiteDashboardPage() {
) )
const [isDatePickerOpen, setIsDatePickerOpen] = useState(false) const [isDatePickerOpen, setIsDatePickerOpen] = useState(false)
const [isExportModalOpen, setIsExportModalOpen] = useState(false) const [isExportModalOpen, setIsExportModalOpen] = useState(false)
const [lastUpdatedAt, setLastUpdatedAt] = useState<number | null>(null) const lastUpdatedAtRef = useRef<number | null>(null)
const [, setTick] = useState(0) const [, setTick] = useState(0)
// Dimension filters state // Dimension filters state
@@ -371,7 +371,7 @@ export default function SiteDashboardPage() {
// Track when data was last updated (for "Live · Xs ago" display) // Track when data was last updated (for "Live · Xs ago" display)
useEffect(() => { useEffect(() => {
if (overview) setLastUpdatedAt(Date.now()) if (overview) lastUpdatedAtRef.current = Date.now()
}, [overview]) }, [overview])
// Tick every 1s so "Live · Xs ago" counts in real time // Tick every 1s so "Live · Xs ago" counts in real time
@@ -537,7 +537,7 @@ export default function SiteDashboardPage() {
setTodayInterval={setTodayInterval} setTodayInterval={setTodayInterval}
multiDayInterval={multiDayInterval} multiDayInterval={multiDayInterval}
setMultiDayInterval={setMultiDayInterval} setMultiDayInterval={setMultiDayInterval}
lastUpdatedAt={lastUpdatedAt} lastUpdatedAt={lastUpdatedAtRef.current}
annotations={annotations} annotations={annotations}
canManageAnnotations={true} canManageAnnotations={true}
onCreateAnnotation={handleCreateAnnotation} onCreateAnnotation={handleCreateAnnotation}