Expose mission-control mode on home/bridge/analytics, quiet-chain freshness copy, and a canonical-first indexed token list with WETH9 metadata override and non-canonical warnings. Co-authored-by: Cursor <cursoragent@cursor.com>
34 lines
895 B
TypeScript
34 lines
895 B
TypeScript
'use client'
|
|
|
|
import EntityBadge from '@/components/common/EntityBadge'
|
|
import { usePostureGlossary } from '@/components/common/PostureGlossaryProvider'
|
|
import { resolvePostureTermId } from '@/data/postureGlossary'
|
|
|
|
export default function PostureBadge({
|
|
label,
|
|
tone,
|
|
className,
|
|
}: {
|
|
label: string
|
|
tone?: 'neutral' | 'success' | 'warning' | 'info'
|
|
className?: string
|
|
}) {
|
|
const { openTerm } = usePostureGlossary()
|
|
const termId = resolvePostureTermId(label)
|
|
|
|
if (!termId) {
|
|
return <EntityBadge label={label} tone={tone} className={className} />
|
|
}
|
|
|
|
return (
|
|
<button
|
|
type="button"
|
|
onClick={() => openTerm(termId)}
|
|
title="Open posture glossary"
|
|
className="rounded-full focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500"
|
|
>
|
|
<EntityBadge label={label} tone={tone} className={className} />
|
|
</button>
|
|
)
|
|
}
|