fix(web): 延遲渲染 IwoooS drilldown 區塊
Some checks failed
CD Pipeline / tests (push) Successful in 1m30s
Code Review / ai-code-review (push) Successful in 11s
CD Pipeline / build-and-deploy (push) Has been cancelled
CD Pipeline / post-deploy-checks (push) Has been cancelled

This commit is contained in:
Your Name
2026-05-31 19:05:28 +08:00
parent aee3a91f6c
commit fb9e8bffa6

View File

@@ -23,7 +23,7 @@ import {
} from 'lucide-react'
import Link from 'next/link'
import { useTranslations } from 'next-intl'
import type { ReactNode } from 'react'
import { useState, type ReactNode } from 'react'
import { AppLayout } from '@/components/layout'
type PostureMetric = {
@@ -3438,6 +3438,7 @@ const page = {
color: '#141413',
padding: '22px',
fontFamily: 'var(--font-body), monospace',
overflowX: 'hidden' as const,
}
const band = {
@@ -3457,9 +3458,12 @@ function IwoooSSectionGroup({
defaultOpen?: boolean
children: ReactNode
}) {
const [expanded, setExpanded] = useState(defaultOpen)
return (
<details
open={defaultOpen}
open={expanded}
onToggle={event => setExpanded(event.currentTarget.open)}
style={{
marginBottom: 14,
borderTop: '0.5px solid #d8d2c3',
@@ -3494,7 +3498,7 @@ function IwoooSSectionGroup({
{summary}
</span>
</summary>
<div style={{ display: 'grid', gap: 14 }}>{children}</div>
{expanded ? <div style={{ display: 'grid', gap: 14 }}>{children}</div> : null}
</details>
)
}
@@ -3560,7 +3564,7 @@ function IwoooSVisualCommandDashboard() {
style={{
marginTop: 14,
display: 'grid',
gridTemplateColumns: 'repeat(auto-fit, minmax(145px, 1fr))',
gridTemplateColumns: 'repeat(auto-fit, minmax(min(100%, 180px), 1fr))',
gap: 10,
}}
>
@@ -3616,7 +3620,7 @@ function IwoooSVisualCommandDashboard() {
style={{
marginTop: 12,
display: 'grid',
gridTemplateColumns: 'repeat(auto-fit, minmax(135px, 1fr))',
gridTemplateColumns: 'repeat(auto-fit, minmax(min(100%, 180px), 1fr))',
gap: 8,
}}
>
@@ -12525,7 +12529,7 @@ export default function IwoooSPage({ params }: { params: { locale: string } }) {
<section
style={{
display: 'grid',
gridTemplateColumns: 'repeat(auto-fit, minmax(240px, 1fr))',
gridTemplateColumns: 'repeat(auto-fit, minmax(min(100%, 180px), 1fr))',
gap: 14,
marginBottom: 14,
}}