Commit c33c1ea
committed
fix(rank): DocShareButton 改为 ssr:false 修复 hydration mismatch
fumadocs 的 PageTOCPopover 内部调 useId 生成 Radix Collapsible 的 aria-controls,
DocShareButton 参与 SSR 时会让 server/client 的 useId 计数错位,导致
aria-controls 在 hydration 阶段不一致。改用 next/dynamic { ssr: false } 仅在
客户端 mount 这个按钮,保持 fumadocs 的 useId 顺序稳定。1 parent 9172f48 commit c33c1ea
1 file changed
Lines changed: 14 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
18 | 31 | | |
19 | 32 | | |
20 | 33 | | |
| |||
0 commit comments