()
| 400 | if (!list) return |
| 401 | |
| 402 | const updateIndicator = () => { |
| 403 | const activeTab = list.querySelector('[data-state="active"]') as HTMLElement | null |
| 404 | if (!activeTab) return |
| 405 | |
| 406 | setIndicator({ |
| 407 | left: activeTab.offsetLeft, |
| 408 | width: activeTab.offsetWidth, |
| 409 | }) |
| 410 | setReady(true) |
| 411 | } |
| 412 | |
| 413 | updateIndicator() |
| 414 |