fix(web): render AwoooP index directly
This commit is contained in:
@@ -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 = [
|
||||
|
||||
@@ -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])
|
||||
|
||||
|
||||
@@ -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 },
|
||||
],
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user