fix(web): render AwoooP index directly
Some checks are pending
CD Pipeline / post-deploy-checks (push) Blocked by required conditions
Code Review / ai-code-review (push) Successful in 13s
CD Pipeline / tests (push) Successful in 1m12s
CD Pipeline / build-and-deploy (push) Successful in 3m36s

This commit is contained in:
OG T
2026-05-06 12:44:42 +08:00
parent 96ad3a18ee
commit 682c0b9995
5 changed files with 23 additions and 12 deletions

View File

@@ -108,7 +108,7 @@ export function FlywheelKPICard() {
const fmt = (n: number | undefined, digits = 0) =>
n == null ? '--' : n.toLocaleString(undefined, { maximumFractionDigits: digits })
const pct = (n: number | undefined) =>
const pct = (n: number | null | undefined) =>
n == null ? '--' : `${Math.round(n * 100)}%`
const kpis = [

View File

@@ -23,6 +23,7 @@
*/
import { useState, useCallback, useMemo, Suspense, type ReactNode } from 'react'
import type { Route } from 'next'
import { useSearchParams, useRouter, usePathname } from 'next/navigation'
import { useTranslations } from 'next-intl'
import { cn } from '@/lib/utils'
@@ -111,8 +112,8 @@ export function PageTabs({ tabs, defaultTab, syncWithUrl = true }: PageTabsProps
params.set('tab', tabId)
}
const query = params.toString()
// @ts-expect-error — Next.js router.push 型別限制,但動態路徑是合法的
router.push(`${pathname}${query ? `?${query}` : ''}`, { scroll: false })
const nextPath = `${pathname}${query ? `?${query}` : ''}` as Route
router.push(nextPath, { scroll: false })
}
}, [syncWithUrl, searchParams, router, pathname, defaultTab, tabs])

View File

@@ -87,7 +87,7 @@ const NAV_SECTIONS: NavSection[] = [
{ id: 'security-compliance', href: '/security-compliance', labelKey: 'securityCompliance',Icon: Shield },
{ id: 'knowledge', href: '/knowledge', labelKey: 'knowledge', Icon: BookOpen },
{ id: 'governance', href: '/governance', labelKey: 'governance', Icon: ShieldCheck },
{ id: 'awooop', href: '/awooop', labelKey: 'awooop', Icon: BrainCircuit },
{ id: 'awooop', href: '/awooop/work-items', labelKey: 'awooop', Icon: BrainCircuit },
],
},
{