fix(NodeSwitcher): return null during SSR to avoid hydration mismatch
Build and Deploy / Build and Push Docker Image (push) Successful in 1m57s

This commit is contained in:
2026-08-08 03:37:15 +08:00
parent 901de3e340
commit 36d39e4a47
@@ -26,6 +26,9 @@ export function NodeSwitcher() {
setSelected(activeInterconnectNodeId || 'local') setSelected(activeInterconnectNodeId || 'local')
}, []) }, [])
// SSR 时返回 null,避免 hydration 错误
if (!mounted) return null
const fetchNodes = useCallback(async () => { const fetchNodes = useCallback(async () => {
try { try {
const res = await getNodes() const res = await getNodes()